mysql>mysql -u root -p
mysql>输入密码登录。
mysql>set password for root@localhost = password(‘新密码‘);
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> set password for root@localhost = password(‘新密码‘);
Query OK, 0 rows affected (0.00 sec)
mysql>quit //成功退出