Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to remove skip-networking from MySQL startup parameters

I am running MySQL on Linux on Centos on a VPS

Can someone please tell a newbie how to do this ?

I suppose to start and stop the mySQL server, I have to do something like this
/etc/init.d/mysqld stop
/etc/init.d/mysqld start

# ps -ef|grep 'mysql'  
root     11331 20220  0 10:53 pts/0    00:00:00 grep mysql  
root     32452     1  0 Apr02 ?        00:00:00 /bin/sh /usr/bin/mysqld_safe --skip-grant-tables --skip-networking  
mysql    32504 32452  0 Apr02 ?        00:00:18 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/ --skip-external-locking --socket=/var/lib/mysql/mysql.sock --skip-grant-tables --skip-networking
share|improve this question
up vote 1 down vote accepted

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

share|improve this answer
Just checked. That file doesn't have this parameter – RN. Apr 3 '10 at 15:05
Try running this query SHOW VARIABLES LIKE 'skip_networking';. If it's set to ON you might not have your port configured in the my.cnf. – gekkz Apr 3 '10 at 15:18
It is ON. Checked my /etc/my.cnf. It doesn't have a port defined. Basically, I am trying to troubleshoot… – RN. Apr 3 '10 at 15:23
Add port = 3306 in my.cnf and bind-address = YOUR_IP and try again. – gekkz Apr 3 '10 at 15:29
All I did was add the port to my.cnf. Did not add bind-address. – RN. Apr 4 '10 at 16:06

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

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

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

Restart with:

service mysqld restart


/etc/init.d/mysqld restart
share|improve this answer

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?

share|improve this answer

I suppose you are also trying it as root. I got the same problem, and this tweak helped me:

Change this line in /etc/my.cnf



share|improve this answer
It's really bad advice. You should avoid running daemons as root for secuirty reasons. – sumar May 20 '10 at 7:06
agreed... but this is b'coz of the conflict in new MySQL Release and User Permission... And the Person here most probably is trying that as ROOT So, i replied the least confusing reply where he/she wouldn't have to change anything else he/she is doing ................... otherwise he/she could login as the new 'mysql' gets created and do the changing... or change the "user=root" with any low-priority user to access it – AbhishekKr May 20 '10 at 14:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.