Linux rpm安裝MySQL

五柳-先生發表於2015-10-15

1:檢視作業系統資訊

##uname -a

:

準備軟體包:

MySQL-server-5.6.19-1.rhel5.x86_64.rpm

MySQL-devel-5.6.19-1.rhel5.x86_64.rpm

MySQL-client-5.6.19-1.rhel5.x86_64.rpm

下載地址:http://dev.mysql.com/downloads/mysql/

MySQL-server-5.6.19-1.rhel5.x86_64.rpm

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-server-5.6.19-1.rhel5.x86_64.rpm

 

MySQL-devel-5.6.19-1.rhel5.x86_64.rpm

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-devel-5.6.19-1.rhel5.x86_64.rpm

 

MySQL-client-5.6.19-1.rhel5.x86_64.rpm

http://cdn.mysql.com/Downloads/MySQL-5.6/MySQL-client-5.6.19-1.rhel5.x86_64.rpm

2:安裝服務端:

 

#rpm -ivh MySQL-server-5.6.19-1.rhel5.x86_64.rpm

 

錯誤原因:包衝突

 

#yum -y remove mysql-libs-5.1*

 

重新安裝即可:

 

# rpm -ivh MySQL-server-5.6.19-1.rhel5.x86_64.rpm

 

3:安裝客戶端


3:嘗試啟動服務

 

# /etc/init.d/mysql start

 

4:停止服務

# /etc/init.d/mysql stop

# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &

# mysql -u root mysql

 

mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root';
mysql> FLUSH PRIVILEGES;

mysql> quit

重新執行:
Mysql>SET PASSWORD = PASSWORD('123456');

 轉載: http://www.cnblogs.com/xiaoit/p/3877913.html

 

相關文章