首次进入Mysql修改密码报“The MySQL server is running with the --skip-grant-tables option so it cannot execute”

    技术2022-07-27  105

    第一次安装完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)

     

    Processed: 0.009, SQL: 9