Mysql5.7忘记root密码

1、修改配置文件 #vi /etc/my.cnf 在mysqld配置模块添加:skip-grant-tables = true,然后重启mysql 2、登录数据库: mysql -uroot -S /tmp/mysql.sock 执行以下命令修改root密码: update mysql.user set authentication_string=password(‘password’) wher
相关文章
相关标签/搜索