Mountain Lion Server MySQL Install Weirdness

I’ve been using mySQL on Macs since I was running debian linux on a Quadra 700 in the late nineties. So you can say that I’ve had to deal with every curve that Apple throws at us with respect to web services. After debian, I ran darwin until Apple released Mac OX Beta in 1999.

The latest challenge was while upgrading my Intel Nahalan Xserve to Mountain Lion Server, 10.8.2. Lo and behold there is no mysql installed. So gleefully I went over the to get the latest installer dmg ( Once I tried to run “mysql” on the command line to test, I kept getting the age old “Cannot connect to /var/mysql/mysql.sock” error. No biggie, just check that the file is there or create a symbolic link to /tmp/mysql.sock…

However no matter what I tried, I kept getting the error… so I needed to dig deeper. Some sage user suggested checking the error log inside /var/mysql/data – by looking for a file matching your hostname and ending with .err . So I set up a tail and ran the mysql startUpItem script by hand and watched the log. (/Library/StartupItems.MySQLCOM/MySQLCOM start). Sure enough it would start and then immediately abort and shutdown.

Turns out the mySQL configuration file was wrong (/etc/my.cnf). I’m not sure where mine came from, possibly an older installer. You may not run into this problem, since Lion and Mountain Lion don’t come with mySQL installed. So the error I saw first was “unknown option skip-locking”. I commented that out (backing up the my.cnf before starting) and ran the start command again. I also had to comment out “table_cache=512” and “skip-thread-priority”. Afterwards mysql started up like it should. So I’m putting this out there, in case it helps the next poor sap.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.