TomatoCheese Blog

Migrating MySQL 5.0.45 to Mac OS X 10.5 Leopard

Posted by Joannou Ng on 2007.11.01 GMT at 18:59

If you Archive and Installed Leopard, and installed MySQL 5.0.45 on your previous OS X using the official MySQL package, then the following will migrate your MySQL to Leopard.

Copy your MySQL over:
sudo cp -pR /Previous\ Systems.localized/datetime_you_installed_leopard/usr/local/mysql-5.0.45-osxyour_previous_os_x_version-your_architecture /usr/local/mysql-5.0.45-osxyour_previous_os_x_version-your_architecture

Copy your MySQL symlink over too:
sudo cp -pR /Previous\ Systems.localized/datetime_you_installed_leopard/usr/local/mysql /usr/local/mysql

Remove the MySQL startup item (we’ll use the preferred launchd instead):
sudo rm -R /Library/StartupItems/MYSQLCOM

Also, right-click and remove the MySQL preference pane in System Preferences because we’ll be using the preferred launchd instead.

Copy this MySQL launchd configuration file to /Library/LaunchDaemons, and change its owner to root:
sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plist

Change your MySQL owner to mysql:
sudo chown -R mysql /usr/local/mysql-5.0.45-osxyour_previous_os_x_version-your_architecture /usr/local/mysql

Load the MySQL launchd configuration file:
sudo launchctl load /Library/LaunchDaemons/com.mysql.mysqld.plist

Got MySQL?