Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot start Mysql on Mac

Tags:

mysql

macos

I'am not able to get MySQL running after installation using Brew. I'am using OS X El Capitan Version 10.11.3 and MySQL Server version 5.7.11. When I start the server I receive:

Starting MySQL. ERROR! The server quit without updating PID file (/usr/local/var/mysql/Hedis-MacBook-Pro.local.pid).

and this what I get in my err file:

2016-03-19T20:59:45.907542Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable

Does any one have got this before?
Many thanks.

like image 594
Hedi Ayed Avatar asked Mar 23 '16 16:03

Hedi Ayed


1 Answers

I received this same error after updating homebrew.

To fix this I had to reset the owner of the mysql data dir, it was changed back to my userid after the update.

cd /usr/local/mysql
sudo chown -R _mysql data/

Assuming your mysql home dir is in /usr/local

After this a restart of the service worked

$ sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
. SUCCESS! 
like image 87
DevChuck Avatar answered Oct 17 '22 23:10

DevChuck