随笔-204  评论-90  文章-8  trackbacks-0
1、打开my.cnf 加入 skip-grant-tables
2、mysql.service stop && mysql.service start
3、清空root密码 并 退出
    update mysql.user set authentication_string='' where user='root';  
4、mysql.service stop && mysql.service start
5、mysql -root   免密登录并修改root密码
    alter user 'root'@'%' identified by 'pass$123';
    alter user 'root'@'localhost' identified by 'pass$123';

确定是否支持远程登录,host中有%的记录即支持
select host, user, authentication_string, plugin from user;
posted on 2021-08-05 18:06 一凡 阅读(174) 评论(0)  编辑  收藏 所属分类: DATABASE

只有注册用户登录后才能发表评论。


网站导航: