标签:
1.修改my.cnf
#位置一般是
/etc/my.cnf
2.重启mysql服务
service mysqld restart
3.进入mysql
mysql -uroot -p 然后直接回车
4.修改密码
use mysql; UPDATE user SET Password = PASSWORD(‘密码‘) WHERE user = ‘root‘; FLUSH PRIVILEGES; exit;
5.完成!
标签:
原文地址:http://www.cnblogs.com/boystar/p/5568782.html