After entering MySQL, enter the appropriate statement:
GRANT All Privileges on *.* to 'MyUser'@'%'Identified by 'MyPassword' with GRANT OPTION; where'MyUser'、'MyPassword'you need to replace the actual user name and password. For example, Grant All Privileges on *.* to 'Root'@'%'Identified by 'Admin' with GRANT OPTION;
The error may be as follows:
ERROR 1820 (HY000): Must reset your password using ALTER USER statement before executing this statement.
Correct:
Mysql> SetPassword=Password'Admin'); Query OK,0Rows affected,1Warning (0.01sec) MySQL> GRANT All Privileges on *.* to 'Root'@'%'Identified by 'Admin' with GRANT OPTION; FLUSHPrivileges; Query OK,0Rows affected,1Warning (0.00sec) Query OK,0Rows Affected (0.00sec) MySQL>FLUSHPrivileges; Query OK,0Rows Affected (0.00sec) MySQL>quit; Bye
Successfully modified
Modify the permissions in MySQL for remote authorization