1. 程式人生 > >Centos 6.5安裝mysql 5.5

Centos 6.5安裝mysql 5.5

#列出安裝的mysql 
rpm -qa | grep mysql
#centos6.5 basic server 版本 預設安裝了mysql5.1,所以先解除安裝mysql5
yum -y remove mysql-libs-5.1* 


 1.安裝service:

rpm -ivh MySQL-server-5.5.48-1.linux2.6.x86_64.rpm


2:安裝client:

rpm -ivh MySQL-client-5.5.48-1.linux2.6.x86_64.rpm


3.啟動服務and修改密碼
service mysql start

/usr/bin/mysql_secure_installation


Remove anonymous users?   刪除匿名使用者?
Disallow root login remotely? 禁止root遠端登入?
Remove test database and access to it? 刪除測試資料庫並訪問它?

Reload privilege tables now?  現在重新載入許可權表?


4.登入: 

startmysql -uroot -p123456

安裝mysql方法,一定記得修改密碼

所需mysql安裝包下載地址:http://download.csdn.net/download/sq347216161/10271544

MySQL-5.5.48-1.linux2.6.x86_64.rpm-bundle.tar

解壓出所需service以及client