2

Several problems with mysql since last Sierra Update. Reinstalled several times with brew or mysql dmg and followd many many "solutions" on SO.

Finally it worked but after a Mac Crash, I face the same problem.

  • MySql won't start from preference panel
  • Mysql won't start from terminal: Can't connect through /tmp/mysql.sock...of course, mysqld is not running
  • trying to start mysqld:

    sudo /usr/local/mysql/support-files/mysql.server start

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

    sudo /usr/local/mysql/bin/mysqld several errors and shutdown

a bit stuck

3 Answers 3

6

Just tried this

sudo /usr/local/mysql/bin/mysqld_safe mysqld_safe Logging to '/usr/local/mysql/data/My-iMac.local.err'. Starting mysqld daemon with databases from /usr/local/mysql/data mysqld_safe mysqld from pid file /usr/local/mysql/data/My-iMac.local.pid ended 

And now looking at error log, the explanation is clear:

tail /usr/local/mysql/data/My-iMac.local.err InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it. 

So I added in my.cnf

[mysqld] innodb_force_recovery = 1 

and now it starts!

It was probably due to previous Mac Crash

Sign up to request clarification or add additional context in comments.

Comments

3

In my case the owner of the data folder was changed after an OS update.

After fixing this with …

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

… everything worked like a charm again.

Comments

-1

Oh, I feel your pain. I've had this happen many times. Stopping the processes didn't always work. To solve this I simply went into System Preferences and MySQL... stop the process from there and try to restart.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.