ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
在安装Mysql5.7.11过程中重置密码时报了这个错误
刚开始是获取随机密码

grep 'temporary password' /var/log/mysqld.log

获取到的随机密码登陆失败无奈就只好设置跳过密码验证了
在vim /etc/my.cnf中
[mysqld]后面任意一行添加“skip-grant-tables”用来跳过密码验证的过程

skip-grant-tables

然后修改密码

ALTER USER 'root'@'localhost' IDENTIFIED BY '@abcd123456'; 

就报了这个问题
The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解决方法:
先执行

flush privileges;

然后再执行修改密码

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码';

更多推荐