Issue :

How to prevent anybody from accessing MySQL databases hosted on the server from any local PC ?

Solution :

This can be achieved in two ways :

1. By blocking the port 3306 . You can use iptables in order to do this :

/sbin/iptables -A INPUT -i eth0 -p tcp –destination-port 3306 -j DROP

OR

2. Put the following in my.cnf :

skip-networking

Source : WHT


Shares
Contact Us On WhatsApp