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?
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|
|
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 i.e.
|
|||
|
|
|
In /etc/mysql/my.cnf, set "user" to "mysql" in the [mysqld] section. |
|||
|
|
Execute the following commands from under your account:
Then you can restart service by service mysqld restart. You can check which user it is running under by issuing
|
|||
|
|