Linux firewall (MySQL 3306 port is not open) for security lnmp The default is to disable remote connections
To view the existing iptables rules, display the serial number, and enter the following command on the Linux terminal:
Iptables-l-N--line-numbers
found that the fifth corresponding 3306 port is drop (reject), so we need to manually open, enter the following command to open, Linux terminal input the following command:
Iptables-d INPUT 5
The error code is 1130,error 1130:host xxx.xxx.xxx.xxx was not allowed to connect to the this MySQL server was unable to give remote connection user rights issue
SQL code
GRANT all privileges on . To ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
After the execution, and then
Mysql:flush privileges;
Just refresh the permissions and don't restart.
Full operation:
Start-to-run->cmd
cd\
cd MySQL installation directory \ Bin
Mysql-u root-p123456;
MySQL GRANT all privileges on . To ' root ' @ '% ' identified by ' 123456 ' with GRANT OPTION;
MySQL flush privileges;
Navicat Connection LNMP Database error resolution