Alibaba Cloud opens mysql3306 remote access

      I bought an Alibaba Cloud ecs server today and configured it with Alibaba Cloud's security group rules. Other ports can be accessed remotely, but MySQL's cannot. Later, after I raised a work order, I found out that the default binding port for ubuntu mysql is the local port ( That is, 127.0.0.1:3306), change this to 0.0.0.0:3306.

      The following are the specific steps (mine is Ubuntu 14.04):

       1. Open the firewall to open port 3306, and Baidu can open iptables.

       2. Enter the Alibaba Cloud console--"Security Group--"Add Rules--"Open 3306.

       3. Edit /etc/mysql/my.cnf with vi

       4. Find bind-address = 127.0.0.1 and change 127.0.0.1 to 0.0.0.0, save



           5. Restart msyq. service mysqld restart

Remote connections can be accessed normally.

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326232208&siteId=291194637