本文為大家講解的是mysql錯誤:The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement解決方法,感興趣的同學參考下。
錯誤描述:
mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';
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.01 sec)
# 把在所有數據庫的所有表的所有權限賦值給位於所有IP地址的root用戶。
mysql> grant all on cactidb.* to dbuser@'localhost' identified by '123';
Query OK, 0 rows affected (0.00 sec)
2、遠程連接設置
把在所有數據庫的所有表的所有權限賦值給位於所有IP地址的root用戶。
mysql> grant all privileges on *.* to root@'%'identified by 'password';
如果是新用戶而不是root,則要先新建用戶
mysql>create user 'username'@'%' identified by 'password';
此時就可以進行遠程連接了。