一个问题纠结好久,反复确认语法问题。可是后来网上搜了一下,茅塞顿开。特此总结一下。mysql
mysql> grant select,insert,update,delete on *.* to 'root'@'%'; 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> mysql> mysql> mysql> grant select,insert,update,delete on *.* to 'root'@'%'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> grant all on *.* to 'root'@'%'; Query OK, 0 rows affected (0.00 sec)
解释说明:
对root用户进行受权远程登陆,而后发现报错ERROR 1290 (HY000)
而后进行flush privileges。
而后再次执行受权,问题解决。sql