Installing MySQL Sandbox on CentOS 6
MySQL sandbox is used to easily deploy MySQL instances for testing. You can easily setup a single node, master-slave nodes, master-master nodes with one command.
More information on MySQL Sandbox is listed here: http://search.cpan.org/~gmax/MySQL-Sandbox-3.0.25/lib/MySQL/Sandbox.pm
To install MySQL sandbox, you will need compiler tools and MySQL dependencies. Please refer to
http://tech-for-me.blogspot.com/2012/07/installing-sysbench-from-launchpad.html for installing these dependencies.
1. Install cpan
yum install cpan
2. Install build dependencies
yum install perl-Test-Simple
3. Install MySQL sandbox
cpan MySQL::Sandbox
4. Test if Sandbox is installed:
make_sandbox
MySQL Sandbox should not run as root
If you know what you are doing and want to
run as root nonetheless, please set the environment
variable 'SANDBOX_AS_ROOT' to a nonzero value
5. Test is MySQL Sandbox can create one MySQL instance:
su - <regular user>
wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.25a-27.1/binary/linux/x86_64/Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz
mysql_sandbox Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz
mysql -umsandbox -pmsandbox --host=127.0.0.1 --port=5525
5. Test is MySQL Sandbox can create one MySQL instance:
su - <regular user>
wget http://www.percona.com/redir/downloads/Percona-Server-5.5/Percona-Server-5.5.25a-27.1/binary/linux/x86_64/Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz
mysql_sandbox Percona-Server-5.5.25a-rel27.1-277.Linux.x86_64.tar.gz
mysql -umsandbox -pmsandbox --host=127.0.0.1 --port=5525
Comments
Can't locate Test/Harness.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/share/perl5/ExtUtils/Command/MM.pm line 50.
make: *** [test_dynamic] Error 2
GMAX/MySQL-Sandbox-3.0.43.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports GMAX/MySQL-Sandbox-3.0.43.tar.gz
Running make install
make test had returned bad status, won't install without force
Solution
yum install perl-ExtUtils-MakeMaker perl-Test-Harness