When you remotely connect to the MySQL database, You Can't connect to MySQL server (10060). We Can start from the following aspects to find out the cause of the error:
1. The network is disconnected.
Check whether the ping is successful.
2. Firewall settings.
Whether the firewall has spared the mysql process and blocked port 3306 of mysql.
3. mysql account settings.
Whether the mysql account cannot be remotely connected. If the connection fails, try the following methods:
Mysql-u root-p // log on to MySQL
Mysql> grant all privileges on *. * TO 'root' @ '%' with grant option; // any remote host can access the database.
Mysql> flush privileges; // you need to enter the command to make the modification take effect.
Mysql> EXIT // EXIT
You can also modify the table to remotely:
Mysql-u root-p
Mysql> use mysql;
Mysql> update user set host = '%' where user = 'root ';
Mysql> select host, user from user;