securing MySQL: easiest/best ways?

Peter Vereshagin peter at
Tue May 8 16:27:09 UTC 2012


2012/05/08 06:49:01 -0700 Paul Beard <paulbeard at> => To FreeBSD-questions :
PB> Monkeying with IPv6, I discovered that globally routable addresses are what it says on the tin, so hiding behind a network appliance is not longer viable for me. An nmap scan showed the port 3306 was hanging out for all to see but  I couldn't figure out how to close it off. The "--skip-networking" argument seems not to work, either in my.cnf or as an rc argument. The server just fails to start. (For some reason the socket is hard-coded to live in /tmp, regardless of what's in my.cnf but I gave up bothering about that.)

How can you know for sure that your my.cnf is being taken into the account by mysqld at all? I remember some issues that made me to put a symlink /etc/my.cnf to ..//usr/local/etc/my.cnf ...

PB> What I ended up doing was adding 
PB> mysql_args="--bind-address="
PB> to /etc/rc.conf. This seems to work as netstat and sockstat no longer show port 3306 listening and database connections are happening. 
PB> Is this the preferred/best way? 

I just think locking mysqld into the jail(4) is better. ;-)

PB> Are you trying to win an argument or solve a problem? 

Whatever I may need.

Peter Vereshagin <peter at> ( pgp: A0E26627 

More information about the freebsd-questions mailing list