Content reference articles on the Web, only records here.
I. Can ' t connect to MYSQL server on ' 192.168.x.x '
This is because the MySQL port is blocked by a firewall and requires Linux to execute the following commands:
1.#/sbin/iptables-i input-p TCP--dport 3306-j ACCEPT
2.#/etc/rc.d/init.d/iptables Save
3.#/etc/init.d/iptables restart
4. Check that the port is open #/etc/init.d/iptables status
Two. 1130-host allowed to connect to this MYSQL server
1.
Mysql-u root-p password>use MySQL;
Mysql>update User Set host = '% ' where user = ' root ';
Mysql>flush privileges;
Mysql>select host, user from user;
2.
1) Connect to MySQL server from any host
GRANT all privileges on * * to ' root ' @ '% ' identified by ' password ' with GRANT OPTION;
FLUSH privileges;
2) Only allow the user root to connect to the MySQL server from the IP-192.168.x.x host and use password as the password
GRANT all privileges on * * to ' root ' @ ' 192.168.x.x ' identified by ' password ' with GRANT OPTION;
FLUSH privileges;
If you want to allow user root to connect to a database on a MySQL server from a host with IP 192.168.x.x ', and use password as the password
GRANT all privileges the database name. * to ' root ' @ ' 192.168.x.x ' identified by ' password ' with GRANT OPTION;
FLUSH privileges;
Navicat remote Connection not on MySQL solution