Tuesday, September 15, 2009

Upgrade to Mac OS X Snow Leopard (as a development machine for Ruby on Rails) 2

All I was trying to do was to switch to MySQL 64bit. That led to changing the whole thing. Installed MySQL 5.1 64bit. I had to switch to the preinstalled Ruby 1.8.7 instead of the one I had installed using MacPorts before because mysql gem installation failed. And that led to installing the gems under /usr and uninstalling the ones that are not 64bit and reinstalling them. There were much more.

Usually, I write what I did to make it work. But it's too long. So I just leave it to say that I'm happy that it's finally all set.

Sunday, September 06, 2009

Upgrade to Mac OS X Snow Leopard (as a development machine for Ruby on Rails)

I have upgraded from OS X 10.5 Leopard to 10.6 Snow Leopard recently.

Then I couldn't access MySQL any more.

After many trials such as installing 64 bit MySQL, etc, I found that all the directories and files except for data and lib had been deleted under MySQL directory and also symbolic link to it when the Snow Leopard upgrade was done. In my case, I had mysql-5.0.45-osx10.4-i686 under /usr/local and I used to have the symbolic link called mysql under /usr/local pointing to it. I found the problem by looking at Time Machine.

So I restored the /usr/local/mysql-5.0.45-osx10.4-i686 directory from the backup using Time Machine and then restored mysql symbolic link.

MySQL setup GUI under "System Preferences..." (under Apple mark menu) didn't work. i.e. MySQL server didn't either start or stop by clicking on the button there. So I restarted Mac OS X in order to start MySQL server.

Then I was able to access to MySQL as before.

The next step is installing 64 bit MySQL to take advantage of OS X Snow Leopard.

(By the way, I'm using MySQL 5.0 because I learned from a local MySQL user group, it's not worth upgrading to 5.1. But I hope it's worth upgrading OS X to Snow Leopard.)