[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
bind-address=127.0.0.1
The key is "bind-address", set that to 127.0.0.1 and no one from outside the server can connect.
mysql, cnf, server, bind, localhost, connections, solutions, mysqld, datadir, var, lib, socket, user, disabling, symbolic, links, recommended, assorted, quot,