2

I've been trying to reset the root password, and have been following these instructions: http://www.coolestguyplanet.net/how-to-change-the-mysql-root-password/

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/*********-********-MacBook-Pro.local.pid 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?

2 Answers2

2

Just do it with sudo:

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

This question might fare better on http://serverfault.com.

It looks like you don't have the correct permissions set for the /usr/local/mysql folder. Be sure it exists and is owned by the mysql user (assuming mysql is the user the mysqld is running as).

Mike Purcell
  • 1,688
  • 7
  • 30
  • 53