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've been trying to reset the root password, and have been following these instructions:

However, when I use the command:

/usr/local/mysql/bin/mysqld_safe --skip-grant-tables

I receive the following output:

111217 10:00:42 mysqld_safe Logging to '/usr/local/mysql/data/******-********-MacBook-Pro.local.err'.
111217 10:00:42 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/mysqld_safe: line 107: /usr/local/mysql/data/********-********-MacBook-Pro.local.err: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 144: /usr/local/mysql/data/*******-**********-MacBook-Pro.local.err: Permission denied
111217 10:00:42 mysqld_safe mysqld from pid file /usr/local/mysql/data/*********-******** ended
/usr/local/mysql/bin/mysqld_safe: line 107: /usr/local/mysql/data/*******-*********-MacBook-Pro.local.err: Permission denied
**********-*********-MacBook-Pro:~ myname$ 

Why would my permission be denied and how can I fix it? (I have checked to see that this is the correct path, and it is). Please help, thank you.

share|improve this question
Those instructions assume that you are running as root. Use sudo /usr/local/mysql/bin/mysql_safe --skip-grant-tables. You will be prompted for your password when you start. – slillibri Dec 17 '11 at 23:28
possible duplicate of Resetting root password for MySQL problems (Mac OS X Lion) – RobM Jan 7 '12 at 11:12

I hope this sounds plausible

You need to shutdown mysql first

The MacBook-Pro.local.err files is probably locked because mysqld is still running.

Once you shutdown mysql, then you can start it back up with --skip-grant-tables

Here ia another possibility:

I normally do not start mysql with mysqld_safe.

I start it as a server (DISCLAIMER: I do not use Mac OSX)

Starting mysqld_safe without it knowing my.cnf will start with whatever mysqld_safe knows of. In Linux, I would start it as

service mysql start --skip-grant-tables

Try starting mysqld_safe with my.cnf as follows:

mysqld_safe --defaults-file=/etc/my.cnf --skip-grant-tables

If /etc is not the location of your my.cnf, locate it and start mysqld_safe as shown, but using the correct path for my.cnf

share|improve this answer
I shut down the MySQL server first before running the skip grant tables code – user1072337 Dec 17 '11 at 22:50
When I try to type service mysql start --skip-grant-tables into terminal, I get the response, -bash: service: command not found – user1072337 Dec 17 '11 at 23:22
In doing some research...OS X nor MySQL will read/follow the my.cnf config file. Is there another way? There has to be a way, this is driving me insane lol. – user1072337 Dec 17 '11 at 23:30

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.