Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mysql not launching: /data/user.local.err: Permission denied

Tags:

mysql

macos

I have just installed mysql on mac 10.6, and it will not launch. When I launch it the traditional way, I get the following:

Starting MySQL........

ERROR! The server quit without updating PID file (/usr/local/mysql/data/user.local.pid).

I followed some other instructions online and deleted my custom my.cnf file and executed this command:

sudo chown -R _mysql:_mysql /usr/local/mysql/

Then tried to launch it in safe mode, to which I received the following list of errors:

160414 12:48:18 mysqld_safe Logging to '/usr/local/mysql/data/user.local.err'.
touch: /usr/local/mysql/data/user.local.err: Permission denied
160414 12:48:18 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/mysqld_safe: line 129: /usr/local/mysql/data/user.local.err: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 166: /usr/local/mysql/data/user.local.err: Permission denied
160414 12:48:18 mysqld_safe mysqld from pid file /usr/local/mysql/data/user.local.pid ended
/usr/local/mysql/bin/mysqld_safe: line 129: /usr/local/mysql/data/user.local.err: Permission denied

How can I get it working?

like image 940
Jessica Chambers Avatar asked Apr 14 '16 10:04

Jessica Chambers


1 Answers

I know its late, thought helpful for someone in future.

This question already have the answer here: MySQL server start issues on Mavericks.

The following answer is referenced from the above question

Reason:

Probably the folder /usr/local/mysql/ don't have the write permissions for the user _mysql

Try changing the folder permission by using the following commands

sudo chown -R _mysql:admin /usr/local/mysql

sudo chmod -R u+rwX,g+rwX,o-rwx /usr/local/mysql

like image 191
Bharathi Avatar answered Sep 23 '22 12:09

Bharathi