Open MySQL Port 3306 in CentOS 7

To allow MySQL to connect from remote server on CentOS 7 server, you need to enable port 3306 in firewall.

To do this, edit file

vi /etc/sysconfig/iptables

Find

-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT

Add above

-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT

Restart server.

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *