Cannot start mysql on mac

I cannot start Mysql 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 get:

Running MySQL. ERROR! The server shuts down without updating the PID file (/usr/local/var/mysql/Hedis-MacBook-Pro.local.pid).

and this is what I get in the err file:

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

Does anyone have this before? Many thanks.

+4
source share
1 answer

I got the same error after updating homebrew.

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

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

Assuming your mysql home directory is in / usr / local

$ sudo /usr/local/mysql/support-files/mysql.server start
Starting MySQL
. SUCCESS! 
+3

All Articles