The client cannot connect to the MySQL database on the server

The client cannot connect to the MySQL database on the server

I purchased an Alibaba Cloud server, installed MySQL by myself, and started the MySQL service, but I still can't connect to the server's database. After some research, I found a solution

First of all, we see that the mysql of the server is running normally

The client access to the remote server test failed:

After research, it is found that port 3306 on the server is not opened in the firewall's inbound rules:

connection succeeded:

[Note: The host name or IP address is the IP of the public network, and the password is the password of the root user, not the password of the database]

[Introduction to the database and database configuration file, watch the blog post: https://blog.csdn.net/weixin_44799217/article/details/112596669 ] [Especially the server IP address in the configuration should be changed to: 0.0.0.0]

Guess you like

Origin blog.csdn.net/weixin_44799217/article/details/114165274