centos-mysql-remoteaccess

By Mac小兔

笔记

1
2
mysql -u root -p mysql
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;

开启访问

1
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

限制访问

1
iptables -D INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

other

1
iptables -L -n
Link.