1 Function Description
1.1 The default port used by the Mysql service is 3311
1.2 the Mysql service is running normally and the 3311 port is mapped to the external network can the database be accessed from the external network.
1.3 if you are under the same LAN, you can directly use the LAN IP to access the database.
2 Operating Instructions
2.1 allow remote access to the database
Change bind- address = 127.0.0.1 to# bind- address = 127.0.0.1 Save and close the file

2.2 Change the value of the Host field in the table under database name: mysql: user to% localhost
Before the change:

After the change:

2.3 is changed and saved, restart mysql service.

After pressing this operation, the mysql service is restarted.
2.4 allow other services on the main server to link the database

2.5 let the web server link to the database

3 Notes
3.1 if the database and other services are in the same LAN, you can directly use the LAN ip, and you do not need to open the 3311 port on the public network at this time.
3.2 if the database and other services are not in the same network segment, you need to ensure that the ip address and port used by the database can be accessed normally outside the network segment.