Tips on downgrading applications
Recently, after swapping a couple of machines (I sent my first-generation Intel-based Mac mini back to the Macworld offices, and we bought an iMac for the kids and general use), I realized that I had inadvertently also disabled my locally-hosted Web sites: I used to use the mini as a local Web server, and it served out copies of the Mac OS X Hints site, as well as the various family sites I maintain. I didn't really want to keep the iMac running all the time just to have the Web server running, so I decided to move the server to my Mac Pro.
While OS X ships with a built-in Web server, it doesn't ship with MySQL, the database engine that enables sites such as macosxhints.com to work. Installing it is relatively straightforward--there are OS X installer versions available on the MySQL site. About the only trick comes in choosing which version of MySQL to install--some content management systems only work with certain versions. In my case, I wanted MySQL 4.1 for compatibility with the macosxhints.com site. Unfortunately, I managed to download and install version 5.0 without noticing. As soon as I noticed the problem, I downloaded the 4.1 package, and attempted to install it. The installer, however, refused to proceed, telling me there was already a newer version of MySQL installed.
Since the installer didn't want to install due to the presence of the newer version of MySQL, I thought I'd first get rid of that newer version. In the case of MySQL, all the code lives in the /usr/local/mysql directory, which is actually a symbolic link (like an alias in the Finder) to a directory with a much longer name. So in Terminal, I issued a sudo rm -r /usr/local/mysql-long-directory-name to remove all the MySQL code. Note that this command will delete all of your MySQL databases in addition to MySQL itself! In my case, I didn't care, because I hadn't yet migrated the databases over to the Mac Pro.
I then tried to run the installer again, but it still failed, saying a newer version was installed. After some thinking, I remembered the /Library/Receipts folder--this is where installers write out records of what they did. Perhaps, I thought, the MySQL installer is looking at the Receipts folder, seeing the MySQL 5.0 receipt, and using that as the basis for stopping the install.
In Terminal, I did cd /Library/Receipts, and then ls -d mysql* to see what was there. Sure enough, I found a receipt for the MySQL 5 installation, named something like mysql-standard-5.0.67-apple-darwin8.5.1-i686.pkg. I deleted that directory (sudo rm -r mysql-standard...), and then ran the 4.1 installer again. Success! The 4.1 install ran fine, I then moved over my databases, and had the internal web server up and running again a few minutes later. OK, so it was several hours later; it just seemed like a few minutes!
Generalizing from my experiences with MySQL, here's the process I would follow to downgrade a program that was installed with Apple's installer:
1.
Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world
On Twitter now
downgrading applications
Powered by Twitter
Esther Schindler
If the comments are ugly, the code is ugly
claird
SVG a graphics format for 21st century
pasmith
Take Chrome OS for a test spin
Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?
jfruh
Android fragments vs. the iPhone monolith
mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive
Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325
Join the conversation here
Quick, practical advice for IT pros. Made fresh daily.
Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.













