问题
mysql> GRANT ALL ON . TO ‘root’@’%’;
ERROR 1410 (42000): You are not allowed to create a user with GRANT
mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘IDENTIFIED BY ‘root’ WITH GRANT OPTION’ at line 1.
解决方案
mysql> CREATE USER ‘root’@’%’ IDENTIFIED BY ‘root’;
mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ WITH GRANT OPTION;
结果