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.