A Fresh Cup is Mike Gunderloy's software development weblog, covering Ruby on Rails and whatever else I find interesting in the universe of software. I'm a full-time Rails and iOS developer.

« Rails 2.2 Migration Goodies | Main | Double Shot #306 »

Upgrading MySQL 5.0 to 5.1 on OS X

I'm too lazy to build from source if there's not a good reason, and for running MySQL on OS X, I've yet to come across a good reason. So, I just use the MySQL Community downloads. Over the weekend I upgraded from 5.0.37 to the latest 5.1 download, because I was hard up against a MySQL bug that was fixed in later builds.

Unfortunately, while just running the installer for 5.1 worked great, it pointed the new server at a brand new set of databases - orphaning the couple of dozen databases I was working with. This was Not Good. The fix comes in two parts.

First, create /etc/my.cnf, with a single entry pointing to the old database files:


Second, tell MySQL to upgrade the files:

sudo mysql_upgrade -u root

Reader Comments (1)

[...] Upgrading MySQL 5.0 to 5.1 on OS X [...]

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>