mysql数据库在初始化完成后,修改密码会报错:
set password for root@'localhost' = password('test123');
报错:
mysql> set password for root@'localhost' = password('test123');
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
解决版本:先执行 flush privileges;
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> set password for root@'localhost' = password('test123');
Query OK, 0 rows affected, 1 warning (0.00 sec)