Sunday, March 29, 2009

MySQL Sandbox approaching version 3


MySQL Sandbox 3.0

MySQL Sandbox is approaching another milestone. Preparing for version 3.0, which will include some new features, version 2.0.98 (based on 2.0.18) can be installed like any other Perl module, and the scripts become available in the PATH.
It means a few seconds more to install the scripts, but a faster and easier usage.

This latest change also means that MySQL Sandbox will be available through the CPAN (Comprehensive Perl Archive Network, for the uninitiated).
The next step will be to include this package in Linux distros (Ubuntu, and eventually Debian, and then Fedora).
If you use the new package, the installation goes like this:

The hard way

Download and unpack MySQL Sandbox, then issue these commands:
$ perl Makefile.PL
$ make
$ make test
$ sudo make install
If you want to install the module in your home directory, say under $HOME/usr/local (a good idea, since MySQL Sandbox was designed for the purpose of installing servers in user space), then you can do the following:
$ export PATH=$PATH:$HOME/usr/local
$ export PERL5LIB=$HOME/usr/local/lib/perl5/site_perl/5.8.8
# change the perl version accordingly
$ perl Makefile.PL PREFIX=$HOME/usr/local
$ make
$ make test
$ sudo make install

The easy way

$ sudo cpan
cpan > install MySQL::Sandbox

Usage

Either way, the Sandbox scripts will now be in your PATH, and you can invoke the scripts quite easily:
$ make_sandbox /path/to/mysql-tarball-5.1.32-YOUR-OS.tar.gz

There is one (very small) incompatible change. Previously, you could get debugging output by setting the DEBUG environmental variable. Now you will have to set SBDEBUG instead.
Enjoy!

3 comments:

Morgan Tocker said...

Quick typo:

$ make_sanbox /path/to/mysql-tarball-5.1.32-YOUR-OS.tar.gz

Should read:

$ make_sandbox /path/to/mysql-tarball-5.1.32-YOUR-OS.tar.gz

Giuseppe Maxia said...

@Morgan,
Thanks! fixed
Giuseppe

Jeremy Zawodny said...

This looks really interesting. I haven't been paying attention much to MySQL Sandbox, but may have a very good use for it.

Thanks!