输入命令 :yum list installed | grep mysql
输入命令:yum -y remove mysql
看到complete就说明成功了
输入命令:yum list | grep mysql
输入命令: yum -y install mysql mysql-server
输入命令:service mysqld start
mysql > use mysql;
mysql > update user set password=‘123456‘ where user=‘root‘;
输入命令:GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘你的密码’ WITH GRANT OPTION;
FLUSH PRIVILEGES;
chkconfig mysqld on
CentOS6.8下使用yum安装mysql,并远程登陆mysql
原文:http://blog.51cto.com/9875854/2086005