第一次安装完mysql,或忘记密码,修改默认密码的时候,结果报“The MySQL server is running with the –skip-grant-tables option so it cannot execute this statement”。
先刷新mysql然后再重新修改密码即可。
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'; ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456'; Query OK, 0 rows affected (0.01 sec)
刷新完,重新执行密码修改。