OSX Snow Leopard MySQL startup problem – Fixed!

2 09 2009

I do a lot of work on MySQL as part of the CONGO project (oh, and incidentally, as part of my full time job), so I was somewhat stymied when, after my upgrade to Snow Leopard (aka OSX 10.6.0), I was unable to start my local MySQL server – I’d get this:

yacht:~ dbs$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Could not find MySQL startup script!

It turns out that as part of the MySQL upgrade, the path to the MySQL installation changed (or a symlink was removed, or something to that effect) – at any rate, /usr/local/mysql no longer existed.
Easy enough to fix, just put a symlink in:

yacht:~ dbs$ cd /usr/local
yacht:local dbs$ ls -ldt mysql*
drwxr-xr-x  17 root  wheel  578 Sep  1 00:31 mysql-5.1.37-osx10.5-x86_64
yacht:local dbs$ sudo ln -s mysql-5.1.37-osx10.5-x86_64/ mysql
yacht:local dbs$ ls -ldt mysql*
lrwxr-xr-x   1 root  wheel   28 Sep  2 12:52 mysql -> mysql-5.1.37-osx10.5-x86_64/
drwxr-xr-x  17 root  wheel  578 Sep  1 00:31 mysql-5.1.37-osx10.5-x86_64

After making the symlink, the startup script ran just fine:

yacht:local dbs$ cd /Library/StartupItems/MySQLCOM/
yacht:MySQLCOM dbs$ sudo ./MySQLCOM start
Starting MySQL database server
yacht:MySQLCOM dbs$ _

I share this to ya’ll for the betterment of geek-kind. 🙂




5 responses

18 09 2009

Thank you for this. I don’t need to go into MySQL very often on my local machine and tonight was the first time I had to get in since I upgraded to Snow Leopard.

20 09 2009
Jed Hartman

Thanks much for posting this! Fixes the problem nicely.
One formatting suggestion:
In my browser window, the final “l” is cut off on the line where you create the symlink, making it look like you’re saying to create a symlink called “mysq”. It was pretty clear what you meant, but it was still mildly confusing for a moment.
So for clarity, it might be worth styling your pre tag with overflow:auto, which should add a horizontal scroll bar in browser windows where one is needed.
…Btw, on an unrelated note, I tried signing in here using TypeKey, but it gave me some kind of error about a site not being registered. Do you have a TypeKey registration number set up in your MT settings?
Anyway, thanks again!

22 09 2009

Jed, thanks very much for the feedback..
I do indeed have a TypeKey token, and it’s configured into the blog, but it’s possible my typekey mapping was wrong. Could you try it again and let me know if it works?

29 11 2009

Hey thanks a lot for posting this! I recently upgraded to snow leopard and lost the symlink.

26 09 2010

Thanks. I just ran across this after patching to SL 10.6.4 on two machines at different times. Worked on machine 1, upgraded, stopped working, still worked on machine 2, upgraded, stopped working. For some reason, launch script could no longer find /usr/local/mysql/bin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: