当前位置:Gxlcms > 数据库问题 > mysql忘记root密码解决

mysql忘记root密码解决

时间:2021-07-01 10:21:17 帮助过:21人阅读

修改配置文件:my.cnf  加上skip-grant-tables

重启mysql

mysql -uroot  登录  

mysql> USE mysql ; 
mysql> UPDATE user SET Password = password ( ‘new-password‘ ) WHERE User = ‘root‘ ; 
mysql> flush privileges ; 
mysql> quit

将配置文件改回来

mysql忘记root密码解决

标签:bsp   grant   roo   nbsp   配置   文件   my.cnf   table   重启   

人气教程排行