linux上mysql5.7上密码忘记,解决方案

xiaoxiao2021-02-28  59

mysql5.7 忘记密码!!! 首先运行 vi /etc/my.cnf,添加skip-grant-tables保存,

然后重启服务 service  mysqld  restart,

这时不需密码,可以直接登陆mysql,通过update语句,修改

update mysql.user set authentication_string=password('MyAegis131423!') where user='root' ;
转载请注明原文地址: https://www.6miu.com/read-31893.html

最新回复(0)