Whitelisting IP for remote MySQL Connection.

Open port 3306 in linux for remote mysql by running this in ssh.

iptables -A INPUT -i eth0 -p tcp -m tcp –dport 3306 -j ACCEPT
In order to whitelist remote servers or your IP you would need to run this mysql command.

GRANT ALL PRIVILEGES ON dbname.* TO [email protected]’IP’ IDENTIFIED BY ‘password’;
Please make sure you have


commented in your /etc/my.cnf

Leave a Reply

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