mysql授权ip段访问mysql grant all privileges on *.* to 'yang'@'192.168.1.%' identified by '123456'; linux iptables开启3306端口 访问 iptables -I INPUT -p tcp -s 192.168.1.0/24 --dport 3306 -j ACCEPT /etc/init.d/iptables save
[root@mysqld ~]# mysql -uroot -h 192.168.1.35 -p Enter password: ERROR 1130 (HY000): Host '192.168.1.66' is not allowed to connect to this MySQL server 下表可见3306端口没打开: [root@v01-svn-test-server online]# service iptables status Table: filter Chain INPU