mysql5.5 多实例找回密码

Posted shijiu520

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql5.5 多实例找回密码相关的知识,希望对你有一定的参考价值。

1.关闭mysql


 killall mysqld


2.启动时加--skip-grant-tables 参数


mysqld_safe --defaults-file=/data/3306/my.cnf --skip-grant-table &


3.登录


mysql -uroot -p -S /data/3306/mysql.sock (登录时空密码)

 

4.修改密码:


update mysql.user set password=password(‘newpassword‘) where user=‘root‘ and host=‘localhost‘;
flush privileges;








以上是关于mysql5.5 多实例找回密码的主要内容,如果未能解决你的问题,请参考以下文章