In a real project, I need MYSQL remote access.
Scenario: After Mysql is installed, local access is normal. It is strange that local machines cannot access the MYSQL database on this server.
Search for information
By default, Mysql cannot be accessed from a remote machine. You can enable remote access through the following configuration.
On the MySQL Server:
Log on to MYSQL.. bin \ mysql-h localhost-u root-p
Prompt you to enter the password, enter the password
Mysql command mode,
Mysql> use mysql;
Mysql> grant all on *. * TO admin @ '%' identified by 'admin' with grant option;
# Allow any IP address (% above) to access the MySQL Server using the admin account and password (admin ).
# You must add an account like this to log on remotely. The root account cannot be remotely logged on. You can only log on locally.
On the server, IP addresses and new users can indeed access the server, but remote machines still cannot access the MYSQL.
By disabling the firewall on the server, you can access MYSQL. However, From the security perspective, you cannot disable the firewall.
Solution:
1. Open the firewall on the control panel and create a new rule in the rule.
2. Select the port and then click Next.
3. select TCP port, enter 80, port number, and press next
4. Select allow all connections
5. Select all next steps.
See http://maximumpcguides.com/windows-7/open-a-port-in-windows-7s-firewall/ for examples
Now you can remotely access your MYSQL data with a new user.