时间:2021-07-01 10:21:17 帮助过:20人阅读
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 多实例找回密码
标签:flush use nbsp and ant bsp mysqld -- pass