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've been trying to start mysqld under a different user as well as with a different data path. I've done so by modifing the my.cnf file as follows:

# Disabling symbolic-links is recommended to prevent assorted security risks


Whenever I try to start the mysql daemon by running service mysqld start two things happen

  1. I get the following error

    ERROR: 1005  Can't create table 'db' (errno: 13)
    121010 13:39:46 [ERROR] Aborting
    121010 13:39:46 [Note] /usr/libexec/mysqld: Shutdown complete
  2. The folder /bob/ and everything in it has mysql:mysql permissions which makes me think the user option in my.cnf did not work and because I run the service start command as root it can just chown the dir as mysql:mysql without running into any problems. At the same time when I run that command I get the following warning:

    121010 13:39:46 [Warning] Ignoring user change to 'mysql' because the user was set to 'bob' earlier on the command line

Any help would be greatly appreciated.


If instead of having the bob user, I put the mysql user and change the permissions of the bob folder to mysql everything works fine. So this is a problem with changing the user not a different data path.

share|improve this question

migrated from Oct 11 '12 at 10:29

This question came from our site for professional and enthusiast programmers.

Make sure the /bob/ folder has the permissions to read and write – GK27 Oct 10 '12 at 18:07
@Stranger it does. Permissions are 777 for testing purposes. – Flo Oct 10 '12 at 18:10
if you use centos/redhat it could be a selinux issue.. if you use ubuntu it might be apparmour. – Mike May 10 '15 at 5:30

You may want to check init script, like /etc/init.d/mysqld or something like that, to see if it initialize mysql database with mysql user.

share|improve this answer
Yes: in /etc/init.d/mysql, su - mysql -s /bin/bash -c "mysqld_safe > /dev/null &" should be changed to su - bob -s /bin/bash -c "mysqld_safe > /dev/null &" – Jerome Jaglale Apr 13 at 22:14

i think changing the user in the mysql-config has only effect when the mysqld is started during the boot process - see here

share|improve this answer
I think what they were trying to say was that if you wanted mysqld to automatically run as that user on startup you would have to change the mysql-config file. Regardless if I restart it, mysql doesn't care if its during boot process or not, it will follow the same steps. – Flo Oct 10 '12 at 18:20

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.