In many cases, mysql only requires local connection, that is, local connection (the server itself). This is also the case by default, and remote connection is not supported by default.
But sometimes, when we need to separate mysql from a host or database and put it on another machine, we need to use remote connection, that is, network connection.
Two methods are required to enable remote connection.
1. Enable the remote connection of mysql itself. Simply put, you can use IP address, domain name, or "%" as the host name when creating a mysql user. "%" indicates all, that is, anyone can connect to the machine. If there is a user password, you can also restrict IP addresses and domain names.
Enabling remote connection is not secure. However, you only need to set a complicated password.
2. Enable the firewall port of the server system. If there is a firewall limit, mysql port is 3306.
After the above two operations, you can connect remotely.
If not, check carefully.
The operation setting method on the wdcp background is visible.
How to enable or set mysql remote connection in wdcp
Reprinted Please note: wdlinux Knowledge Base
Connection: http://www.wdlinux.cn/bbs/thread-3898-1-1.html