Changing startup parameters for MySQL

Open up the /etc/init.d/mysqld script, find the --skip-networking parameter and remove it.


comment the "skip-networking" directive in /etc/my.cnf and restart mysqld.

You can specify other networking related directives in my.cnf, Example:

[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/English
bind-address = 172.20.5.2
# skip-networking

Restart with:

service mysqld restart

or

/etc/init.d/mysqld restart

Follow the white rabbit. At some point, originating from /etc/init.d/mysqld, some script must append the parameter. If existing, check /usr/bin/mysqld_safe. Also look at included files in these scripts.

Maybe we're tampering with a security measure here. Does CentOS add this line unless a password has been set for the mysql root user?