Search code examples
mysqlosx-mountain-lion

Trouble installing MySQL on Osx Mountain Lion


I'm trying to brew install MySQL on Osx 10.8.3.

I've found some posts recommending using the dmg, but I need to use the mysql2 gem, and I've read that it is better to use brew.

I've tried everything from the top two answers here:

brew install mysql on mac os

and tried this tutorial, but I still get this error:

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

MySQL still runs (I don't really understand why), but trying to create a database gives this error:

ERROR 1006 (HY000): Can't create database 'asdf' (errno: 2)

I'm very much at a loss about what's going on, can anyone tell me what the issues here might be?


Solution

  • It appears that your database is either locked, or not started properly. I would suggest checking the PID at (/usr/local/var/mysql/Thomass-MacBook-Pro-5.local.pid) and either kill the process through terminal or from the PID File itself. As long as the PID is still there (whether it's asleep/zombied) you wouldn't be able to update/create a database.

    You may also want to try rebooting your comp if you haven't done this step already.