Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The title is fairly self-explanatory. I am a mysql newbie, so any help is appreciated. I can boot my database and everything works fine using mysqld. When I try to run mysqld_safe in a similar fashion, I get permission denied. Here is what I am running:

mysqld -u root

Everything boots up fine

mysqld_safe -u root

I get permission denied (output below)

140404 14:10:55 mysqld_safe Logging to '/opt/boxen/log/mysql/error.log'. 140404 14:10:55 mysqld_safe Starting mysqld daemon with databases from /opt/boxen/data/mysql /opt/boxen/homebrew/bin/mysqld_safe: line 132: /opt/boxen/log/mysql/error.log: Permission denied /opt/boxen/homebrew/bin/mysqld_safe: line 176: /opt/boxen/log/mysql/error.log: Permission denied 140404 14:10:55 mysqld_safe mysqld from pid file /opt/boxen/data/mysql/My-iMac- 25.local.pid ended /opt/boxen/homebrew/bin/mysqld_safe: line 132: /opt/boxen/log/mysql/error.log: Permission denied

When I check the error logs, here are lines 132 and 176, respectively:

2014-03-27 09:03:11 798 [Note] - '::' resolves to '::';

2014-03-27 09:03:32 1062 [Note] InnoDB: The InnoDB memory heap is disabled

Strangely, these lines from the error log have a different timestamp. I have a feeling I am overlooking something dumb, but I have no idea.

share|improve this question
    
1) provide logs, 2) how do you know you're running mysqld in a similar fashion - what does that even mean? can you provide exact line? –  alexus Apr 4 at 20:54
    
My mistake, the error I had in the question was unrelated: I was looking in the wrong spot in the error log. I've explicitly included what I am putting into the console. It must be some kind of permissions rule I'm not familiar with. –  Doug Mill Apr 4 at 21:22
    
Seems that you have permissions issue on file /opt/boxen/log/mysql/error.log. What is your distro (seems OSX) ? What if you run mysqld_safe with sudo ? –  krisFR Apr 4 at 22:01
    
I was able to fix this with the following: sudo chown root /opt/boxen/log/mysql/error.log Then I booted with: sudo mysqld_safe --user=root It appears to be working now. –  Doug Mill Apr 4 at 22:30
    
I am not surprised. This is what i was suggesting with my previous question in comments –  krisFR Apr 4 at 22:37

1 Answer 1

up vote 2 down vote accepted

Seems that you have a permissions issue on file /opt/boxen/log/mysql/error.log.

Check for permissions on file /opt/boxen/log/mysql/error.log.

You should try to make this file belongs to root user :

  • chown root /opt/boxen/log/mysql/error.log

Then execute mysqld_safe using sudo.

share|improve this answer

Your Answer

 
discard

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.