1. The network is unavailable. Check whether the ping is successful. 2. Firewall settings. Whether the firewall lets go of the mysql process and whether the 3306 port of mysql is blocked. 3.mysql account settings. Whether the mysql account does not allow remote connections.
Quoted from http://database.51cto.com/art/201107/274565.htm
Quoted from http://database.51cto.com/art/201107/274565.htm