Linux 下mysql 忘记root密码,修改密码怎么做?在mysql.user 中并没有password字段,但是有authentication_string

第一步:  vi /etc/my.cnf  在[mysqld] 下 增加 --skip-grant-tables

第二步: service mysql restart

第三步: shell>mysql  进入 控制台

4:     use mysql

5:   update user set authentication_string = password("123456") where user='root';

猜你喜欢

转载自blog.csdn.net/qq_28016947/article/details/50555188