Navicat for MySQL remote connections error report 10038

1, environmental context, Ali cloud Ubuntu14.04.2, mysql-server-5.6, navicat client

 

2, the cause of the problem: 10038 3306 error means that the remote port is not open.

 

3, view the information online, said first turn off the firewall, so to see the firewall status

sudo ufw status

Status: inactive is not turned on,

 Firewall is enabled sudo ufw enable

 Sudo ufw disable firewall close 

 Check firewall status sudo ufw status 

 

 

4, 3306 inspection of the port is open, the default is not open

Run netstat -an | grep 3306, if 3306 is in front of 127.0.0.1, then they would have to modify the configuration files

Modify the configuration file, many online modification method is shown below,

vim /etc/mysql/my.cnf

vim /etc/mysql/mysql.conf.d/mysqld.cnf. Found to bind-address = 127.0.0.1.

 

5, add the security group rules, I also added,

 

6, restart Linux

sudo reboot

 7, mysql database permissions

grant all privileges on *.* to 'root'@'%' identified by '密码'

 flush privileges;

 

ps -aux // view the process ID

ps -aux | more // View all

ps -ef | grep mysql // view the process of mysql

kill -9 3306 // forced to kill the process ID 3306

 

 

 

 

1 Enable

 sudo ufw enable

 sudo ufw default deny 

Role: Turn on the firewall and start with the system simultaneously closing all external access to the machine (the machine to access the external normal).

2 Close

sudo ufw disable 

2 Check firewall status

sudo ufw status 

Guess you like

Origin www.cnblogs.com/andy0816/p/12335359.html