Solutions to the failure to connect to the MySQL database on the Alibaba Cloud server

One database configuration, MySQL default is not able to connect remotely.
Just comment out bind-address = 127.0.0.1 in the my.cnf file under / etc / mysql, as shown in the figure: The
Insert picture description here
second security group setting
Alibaba Cloud server default is only open port number 3389 and 22, that is to say with the ssh protocol can be connected to the database, but the database is not even remotely, because the port number of the database is generally 3306, the solution is to create a security group in Ali cloud server
To create a security group As follows:
Insert picture description here
Insert picture description here
Insert picture description here
It should be noted that when creating a security group, you need your local IP address, but not the IP on your computer. The IP is generally your IP on the local area network, and Alibaba Cloud needs to be found on the Internet. The IP of your public network, that is, the IP of your local area network, can be found by Baidu "IP query".

Published 19 original articles · praised 7 · visits 581

Guess you like

Origin blog.csdn.net/liu201812/article/details/103214562