1. Modify localhost
Change "host" entry in "User" table in "MySQL" Database, changed from "localhost" to "%" remote only allow root login
Mysql>use MySQL;
Mysql>update User Set host = '% ' where user = ' root ';
Mysql>select host, user from user;
Mysql>flush privileges;
2. Designated authorization
Connect to the MySQL server from any host using Myuser/mypassword:
GRANT all privileges on * * to ' myuser ' @ ' percent ' identified by ' MyPassword ' with GRANT OPTION;
Use Myuser/mypassword to connect to the MySQL server from a host with IP 192.168.31.87:
GRANT all privileges on * * to ' myuser ' @ ' 192.168.31.87 ' identified by ' MyPassword ' with GRANT OPTION;
3. Pan-Authorized
Mysql-h Localhost-u Root
Mysql>Grant all privileges on * * to ' root ' @ '% ' with GRANT OPTION; Give any host access to the data as root
Mysql>FLUSH privileges;
This article from the "Struggle for the Dream" blog, declined to reprint!
Mysql Remote Login Configuration