Although my primary development machine is an Intel-based Mac, I still use my venerable PowerBook when working at home, on the road, and so on. I still run Mac OS 10.4 (Tiger) on it, but upgraded to Apache 2 and MySQL 5. The latest pre-built version of MySQL which supports this configuration is 5.0.67. I encountered a couple of problems after the upgrade process which deserve attention.
Upon installing a new version of MySQL, the experts recommend running the mysql_upgrade shell script which automatically checks and repairs your existing tables. I had problems running this script which resulted in the following error:
Looking for 'mysql' in: mysql
FATAL ERROR: Can't find 'mysql'
An excerpt from the MySQL bug report forum:
"I did some more testing. I was using the source distribution of MySQL (file name mysql-5.1.22-rc.tar.gz). What I found out is that mysql_upgrade works fine if I run it from the bin sub-directory! I did not find anywhere in the documentation that it is necessary to cd to the /usr/local/mysql/bin directory before running mysql_upgrade. If I run mysql_upgrade from any other directory then I am getting the error message reported."
This worked for my version of MySQL as well:
$ cd /usr/local/mysql/bin
$ sudo ./mysql_upgrade -u root -p
Under Linux, the script should be in your path, but is located at
$ /usr/bin/mysql_upgrade
While the tables supporting timezones are built, they are not populated with data during the installation process. That required running an additional shell script:
$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Enter Password:
The above command pipes the output from the mysql_tzinfo_to_sql shell script to the mysql client, which imports the sql into the database named "mysql". You may have setup a different user than that specified in the "-u root" option. the "-p" indicates that a password is required.
If you got all the bits right, you may still see a few messages about "Unable to load" this or that which result if there are any non-timezone definition files in the /usr/share/zoneinfo directory. You can ignore these.
Comments
MySQL version
Hi,
How did you determine the supported MySQL 5.x version and the correct archive package to download? I've been searching for some time for an upgrade to MySQL 5.x on my Powerbook G4 (PPC non-Intel) but find that many powerpc packages from the MySQL archives (http://downloads.mysql.com/archives.php) won't install e.g., installers with filenames such as mysql-5.0.xx-osx10.4-powerpc.dmg. I'm assuming these must be targeted at Intel-only Macs, as there is no indication in the filename that would suggest otherwise. Should I try the universal binaries instead e.g., mysql-5.0.67-osx10.4-universal.tar.gz.
Thanks
Chris
Link to PPC-Compatible MySQL 5.0
The latest version of MySQL 5 that runs under my configuration (Mac OS X 10.4.11, PowerPC G4) is 5.0.67.
Any of these three installers should work on the above coniguration:
There are several installers on the mysql downloads page for Mac OS X 10.4, but only some of them are compatible with the PowerPC platform. An installer with "powerpc" in the filename will be for a PowerPC G4 or G5 machine, and NOT for an Intel machine. However, some are for 64-bit CPUs (G5), but the G4 is only a 32-bit processor, so you be sure you grab one of the installers that's NOT marked 64-bit. There are three installers which should be compatible, the ppc-only dmg, ppc tarball (.tar.gz), and the universal binary. The one I used was the ppc-only disk image (dmg), and the direct download link is here.