i针对网段开放端口 (命令行设置)

针对网段开放端口

-A INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 1234 -j ACCEPT

命令行设置iptables

iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 1234 -j ACCEPT
/etc/init.d/iptables save

原文 : http://blog.itpub.net/15498/viewspace-2135384/

mysql>grant select,insert,update,create on test.* to test@'192.168.8.%' identified by '123456';

mysql>grant select,insert,update,create on test.* to test@'192.168.9.%' identified by '123456';

mysql>grant select,insert,update,create on test.* to test@'192.168.20.%' identified by '123456';

上面的语句表示将test数据库的所有权限授权给test这个用户,只允许test用户在192.168.8/9/20这三个网段的IP范围进行远程登陆,并设置test用户的密码为123456

刷新权限表使其设置生效:
mysql> flush privileges;

原文地址:https://www.cnblogs.com/hei-hei-hei/p/6908256.html