mysql更改root密码

vim /etc/my.cnf
[mysqld]模块下添加
skip-grant-tables #忽略权限

重启mysql服务

use mysql; #使用mysql数据库
update user set password=password(“”) where user=“root”; #更改密码
flush privileges; #刷新权限

重启mysql服务
使用新密码登陆

猜你喜欢

转载自blog.csdn.net/weixin_30899981/article/details/87967802
今日推荐