A MySQL server was installed on Ubuntu today and an error occurred when connecting to the MySQL server with client software on Windows:
Error code:2003 cannot connect to MySQL server at (10061
Toss to toss to do not do well, firewall also closed, 3306 Port also added to the outbound rules, but is not even, later inadvertently saw a post, got a hint. Open to /etc/mysql/my.cnf
see the following:
# # Instead of skip-networking The default is now-listen only on# localhost which are more compatible and are not less sec Ure.bind-address = 127.0.0.1#
This means that the MySQL server is bound to the 127.0.0.1 port by default so that other remote clients do not have access, and we have bind-address = 127.0.0.1
commented out here, the result is as follows:
# # Instead of skip-networking The default is now-listen only on# localhost which are more compatible and are not less sec ure.# bind-address = 127.0.0.1#
Then restart the MySQL service:
sudo restart MySQL
Successfully solved!
Error code: 2003 cannot connect to MySQL server in (10061)