Skip to content

Instantly share code, notes, and snippets.

Created August 29, 2009 02:53
Show Gist options
  • Save edward/177368 to your computer and use it in GitHub Desktop.
Save edward/177368 to your computer and use it in GitHub Desktop.
=== Epic Snow Leopard Upgrayyyyd Guide ===
Son, you’re now living in the land of 64-bit systems.
That means that some of your 32-bit shit is now broken.
Not all is lost.
== Fixing MySQL weirdness
Upgrade your MySQL binary to the 64-bit one:
Bring down the existing mysqld if it’s running.
Install the binary:
You want the Mac OS X 10.5 (x86_64) version.
Boot that sucker up:
$ sudo /usr/local/mysql-5.1.37-osx10.5-x86_64/bin/mysqld_safe
Bring your old data into the new database:
Create /etc/my.cnf and fill it with
Bring over the data
$ sudo mysql_upgrade
Remove /etc/my.cnf
$ sudo rm /etc/my.cnf
== Update MacPorts
You get to reinstall all your ports. Ugh.
Save a list of your installed ports:
$ port installed > myports.txt
Blow them all away (or at least mv) your /opt/local
$ rm -rf /opt/local
Install the latest version of MacPorts for Snow Leopard
Install your favourites, taking cues from the myports.txt list
$ sudo port install libxml2 p5-app-ack ImageMagick memcached ragel unrar
$ sudo port install git-core +bash_completion +doc
== Update MySQL gem
$ sudo gem uninstall mysql
$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
== Update the rest of your gems
$ irb
irb> `gem list`.each_line {|line| `sudo env ARCHFLAGS="-arch x86_64" gem install #{line.split.first}`}
=== You’re done! ===
== References
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment