linux系統下安裝mysql
一.**安裝裝包
1.mysql-client-5.6.5_m8-1.linux2.6.i386.rpm
2.mysql-server-5.6.5_m8-1.linux2.6.i386.rpm
二.開始安裝
1)安裝伺服器端
在有兩個rmp檔案的目錄下執行如下命令:
[root@localhost mysql]# rpm -ivh mysql-server-5.6.5_m8-1.linux2.6.i386.rpm
顯示如下資訊。
warning: mysql-server-5.6.5_m8-1.linux2.6.i386.rpm: v3 dsa signature: nokey, key id 5072e1f5 www.2cto.com
preparing... ########################################### [100%]
1:mysql-server ########################################### [100%]
。。。。。。(省略顯示)
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h test1 password 'new-password'
。。。。。。(省略顯示)
starting mysqld daemon with databases from /var/lib/mysql
如出現如上資訊,服務端安裝完畢。測試是否成功可執行netstat看mysql埠是否開啟,如開啟表示服務已經啟動,安裝成功。mysql預設的埠是3306。
啟動mysql
[root@localhost mysql]# /etc/init.d/mysql start
檢視3306埠是否開啟
[root@localhost mysql]# netstat -nat
www.2cto.com
2)安裝客戶端
執行如下命令:
[root@test1 local]# rpm -ivh mysql-client-5.6.5_m8-1.linux2.6.i386.rpm
warning:mysql-client-5.6.5_m8-1.linux2.6.i386.rpm: v3 dsa signature: nokey, key id 5072e1f5
preparing... ########################################### [100%]
1:mysql-client ########################################### [100%]
顯示安裝完畢。
三.登入mysql
[root@localhost mysql]# mysql
welcome to the mysql monitor. commands end with ; or \g.
your mysql connection id is 1 to server version: 4.0.16-standard
type 'help;' or '\h' for help. type '\c' to clear the buffer.
mysql>
出現了「mysql>」提示符,恭喜你,安裝成功!
Linux系統下安裝Mysql
這裡我們來演示命令安裝 第二步 輸入指令 1.sudo apt get update 之前安裝程式,要先更新資源庫第三步 mysql uroot p 測試進行命令登入 show databases 展示資料 use mysql 顯示user select user,host from user 第四...
linux系統下mysql安裝
安裝yum倉庫 安裝mysql伺服器 yum y install mysql community server 啟動mysql伺服器 systemctl start mysqld.service 檢視mysql伺服器裝態 檢視mysql設定的密碼 grep password var log mysq...
linux系統下mysql離線安裝
提取碼 2v8d 一 檢查庫檔案是否存在,如有刪除。root localhost desktop rpm qa grep mysql mysql libs 5.1.52 1.el6 0.1.x86 64 root localhost rpm e mysql libs 5.1.52 x86 64 no...