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

MySQL忘记root密码

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

vim /etc/my.cnf // [mysqld]下添加参数 [mysqld] skip-grant-tables

重启mysql

systemctl restart mysqld 

终端输入 msyql进入数据库

mysql>update mysql.user set authentication_string=password(‘新密码‘) where user=‘root‘ and host=‘localhost‘

MySQL忘记root密码

标签:tar   HERE   tab   password   vim   cat   code   msyql   localhost   

人气教程排行