It was inevitable that rutema would one day have to use a different database than sqlite3.
To do that I needed a testbed therefore I chose mySQL.
This is a “forget-me-not” for the way to a local mySQL installation on Snow Leopard.
Instead of going with the prepackaged .dmg I chose to install mySQL using MacPorts. This was pretty straightforward and went without a hitch.
The mysql executables end up in /opt/local/bin, and they are all suffixed with a ‘5’. The actual binaries are all under /opt/local/lib/mysql5/ (no suffix there).
After compilation succeeds you need to do the following:
- Create the system tables
- Start the server
The _mysql user is already present on Mac OS X 10.6 * Change the root user password
In order to setup privileges, you enter the mysql command shell as root(
) and setup your database and users. The rutema setup looks something like
The current activerecord gem does not include the pure ruby mysql code anymore and requires the C based mysql gem. This is a bit tricky to install as it needs to compile as 64-bit to work with the Apple standard Ruby installation.
should do the trick though.