Use the CTRL + R key combination to quickly open the cmd window and enter the cmd command to open the cmd window.
Use the "mysql-uroot-proot" command to connect to the local MySQL service.
Using the "Use MySQL" command, select the database you want to use, modify the basic information of the remote connection, save it in the MySQL database, and use the MySQL database.
Use "grant all privileges on * * to ' root ' @ '% ' identified by ' root ' with Grant OPTION;" command to change the settings for a remote connection.
Use "flush privileges;" command to refresh the permission that you just modified to take effect.
Use "select Host,user from User;" See if the changes were successful.
Firewall organization Access when resolving remote connections: xp/2003 Adding firewall exception ports
Open firewall, select the Exceptions tab, add ports
Name: Mysqlport
Port number: 3306
Select TCP
Win7 and above add firewall exception ports: Control Panel-Firewall Settings-Advanced settings
Inbound rule Settings
The first step is to select the inbound rule and then create a new rule, select the port, and then next
The second step is to select TCP to select a specific port and then enter the port, where multiple ports need to be separated by commas for example: 3306
Step three select Allow connection
Fourth Step Select configuration file
Fifth Step enter the rule name Mysqlport
Outbound Rule Settings
The first step is to select the outbound rule, then create a new rule, select the port, and then next
The second step is to select TCP to select a specific port and then enter the port, where multiple ports need to be separated by commas for example: 3306
Step three select Allow connection
Fourth Step Select configuration file
Fifth Step enter the rule name Mysqlport (or no special requirements to directly turn off the firewall) Reprint Please specify the Source: http://www.cnblogs.com/fnlingnzb-learner/p/5848405.html
Remote connection to MySQL under Windows