Install mysql/mysqlplus Ruby Gem on MAMP

Posted:

To install mysqlplus on my 32-bit MacBook, running Snow Leopard, I followed: http://boonedocks.net/mike/archives/175-MAMP-and-the-Ruby-MySQL-Gem.html

However, I'm using MAMP 1.9.4 and couldn't find the source for 1.9.4 at http://sourceforge.net/projects/mamp/files/. So, I did the following:

Detect MySQL version MAMP is using

After downloading & installing MAMP, open Terminal, and run:

/Applications/MAMP/Library/bin/mysql --version

Running MAMP 1.9.4, I got:

/Applications/MAMP/Library/bin/mysql  Ver 14.14 Distrib 5.1.44, for apple-darwin8.11.1 (i386) using  EditLine wrapper

So, I downloaded the MySQL Database Server 5.1.44 source code (http://downloads.mysql.com/archives/mysql-5.1/mysql-5.1.44.tar.gz). You can find other sources at http://downloads.mysql.com/archives.php by clicking through to the correct version of the MySQL Database Server and scrolling down to the bottom of the page to "Source and other files."

Then, follow the rest of the instructions here: http://boonedocks.net/mike/archives/175-MAMP-and-the-Ruby-MySQL-Gem.html

Note: For mysqlplus, simply replace mysql with mysqlplus in the final gem install command.

P.S. You might also want to close MAMP before copying the files to the MAMP dir. I forgot to, and it still worked fine... but just in case.