Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm using MySQL on CentOS and I want it to run at startup under the mysql user. I tried /sbin/chkconfig --level 35 mysqld on from my cool-RR user, but it seems like this makes mysql try to run as cool-RR. How do I make it run on startup as user mysql?

share|improve this question
up vote 2 down vote accepted

It should start as mysql user by default. You are probably starting the daemon under your own user account, you should use the startup script instead, which will execute using the config files in /etc


service mysqld stop
service mysqld start
share|improve this answer

In /etc/mysql/my.cnf, set "user" to "mysql" in the [mysqld] section.

share|improve this answer
There was no /etc/mysql/my.cnf, only /etc/my.cnf, and the thing you said was already set to "mysql", but it's not working! – Ram Rachum Sep 17 '09 at 0:48

Execute the following commands from under your account:

chkconfig mysqld on

Then you can restart service by service mysqld restart. You can check which user it is running under by issuing

ps aux | grep mysqld
share|improve this answer

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.