MySQL and Perl trouble when moving from a PowerPC to an Intel Mac
The Migration Assistant utility in Mac OS X can be a huge time saver when you buy a new Mac and want to move all your stuff from the old machine to the new one.
However, there are a few things to watch out for. One issue I ran into when using Migration Assistant to move from a PowerPC-based Mac to an Intel-based one is that it will copy MySQL and Perl. In my case that meant mysql-standard-4.1.21-apple-darwin8.6.0-powerpc and Perl 5.8.6.
Depending on how you use MySQL and Perl this may or may not be a problem. I’ve been experimenting a bit with Drupal and Joomla, and both appeared to work fine after the move, as did phpMyAdmin. Movable Type, which is Perl-based, did not though – when I tried to log in it gave me an error about DBD::MySQL not being able to connect to MySQL properly.
Both MySQL and Perl are outside my area of expertise, so I didn’t really know where to start looking. But after lots of frustrated searching and asking around I finally managed to get Movable Type working again by updating MySQL and installing some database connection stuff for Perl.
In case I run into the same thing again, and in case somebody else has similar problems, here are some tips (another tip is to make sure you have a fresh backup – but you knew that already):
- Copy any changes or additions you have made to /etc/hosts, /etc/apache2/httpd.conf, and /etc/apache2/extra/httpd-vhosts.conf from the old machine to the new one as the Migration Assistant does not do this for you.
- Download and install MySQL for Intel Macs. You need to use a 32-bit MySQL or it will not work with Perl on Mac OS X 10.5 – more on that in “Symbol not found: _mysql_init” on Leopard. Detailed instructions for upgrading MySQL can be found in Mac OS X Server version 10.5: Migrating MySQL Data when upgrading from Mac OS X 10.3 or 10.4 and Upgrading from MySQL 4.1 to 5.0.
- Set a new root password for MySQL. Not sure if this should be necessary, but for me the upgrade removed the root password, so phpMyAdmin couldn’t connect anymore.
- Install the Mac OS X Developer Tools, which are needed for the next step.
- Install DBI and DBD::MySQL. I successfully followed the instructions in Install MySQL and DBD::MySQL on Mac OS X.
After all that I was finally able to log into my local install of Movable Type again. Phew.
I’m not quite sure what caused the problem to begin with. I’m guessing either running a PPC version of MySQL on an Intel Mac, something with the older Perl that was copied, or both.
- Previous post: Don’t duplicate link text in the title attribute
- Next post: W3C web site redesign in beta – send in your feedback
Subscribe / follow
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost