First of all learn how to debug the mysql errors. Usually a tail -f /usr/local/var/mysql/*.err does the trick.
Corrupt InnoDB files
2014-01-13 17:32:09 6124 [ERROR] InnoDB: Unable to lock ./ibdata1, error: 35 2014-01-13 17:32:09 6124 [Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.This problem is usually caused by a corrupted innodb logfile. There files are located in /usr/local/var/mysql and have a "ib" prefix filename (in my case they are named ib_logfile0, ib_logfile1 and ibdata1).
- Backup the ib files: mv /usr/local/var/mysql/ib* ~/Desktop/ib_files/
- Stop mysqld processes; ps xua | grep mysql, and then: kill -9 PID
- Restart the mysql server: mysql.server restart
Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno: 13)
sudo chown -R _mysql /usr/local/var/mysql
Errors after brew upgrades
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist