1.把/etc/my.conf 加多一行skip-grant-tables
2.update user set authentication_string='' where user = 'root';
3.quit;
4.把/etc/my.conf 删掉一行skip-grant-tables
5.再次免密码登录
6.alter user 'root'@'%' identified by 'abc123';
或者alter user 'root'@'localhost' identified by 'abc123';
1264

被折叠的 条评论
为什么被折叠?



