1、打開my.cnf 加入 skip-grant-tables2、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';
確定是否支持遠(yuǎn)程登錄,host中有%的記錄即支持
select host, user, authentication_string, plugin from user;
posted on 2021-08-05 18:06
一凡 閱讀(203)
評論(0) 編輯 收藏 所屬分類:
DATABASE