Author: Dan
Date: 29-04-06 13:46
By default MySQL accepts connection over the LAN. I prefer to restrict it to localhost only. Starting with more recent versions of the FreeBSD MySQL port, you can do this:
$ grep mysql /etc/rc.conf
mysql_enable="YES"
mysql_args="--bind-address=127.0.0.1"
Then restart mysql:
# /usr/local/etc/rc.d/mysql-server.sh restart
Stopping mysql.
Waiting for PIDS: 90230.
Starting mysql.
Before:
# netstat -an | grep 3306
tcp4 0 0 *.3306 *.* LISTEN
After:
# netstat -an | grep 3306
tcp4 0 0 127.0.0.1.3306 *.* LISTEN
As you can see, in the after image, MySQL is listening only on 127.0.0.1 port 3306, instead of all IP addresses (i.e the internet).
--
Webmaster
|
|