Introducing the MySQL Sandbox
by Giuseppe Maxia
This documentation is OBSOLETE.
Please refer to https://launchpad.net/mysql-sandbox for up-to date material.
Installing a side instance of MySQL for testing purpose is a task that many administrators can perform without breaking a sweat. If you need to do that only once in a while, you need just to read the manual carefully, or to have some experience in this matter, and the task is accomplished quite easily.
If, however, your skills are below the Guru level, even to get this task done just once you may find yourself in trouble. And, let's face it, even experienced administrators, when they need to do this several times, with different versions of MySQL, may have trouble doing it right. It would be nice to have a tool that takes care of the dirty details for you and gets the job done quietly, without interfering with existing installations, and without side effects.
Such a tool exists, it's The MySQL Sandbox. It is a framework for testing features under any version of MySQL from 3.23 to 5.1. Whitout fuss, it will install one server under your home directory, and it will provide some useful commands to start and stop it, and to use it within the sandbox.
There are many reasons for installing a side server. One is testing a potentially dangerous application, and you don't want to try it on a production server. Another reason is to try different versions of MySQL on a piece of code when hunting a bug. Or you are a consultant, your customers are all using different versions of the DBMS, and you need to test your procedures in an environment that is as close as possible to the your clients are using. I don't know about you, but in my job I have all the above needs, sometimes all at once.
Bonjourno Guiseppe, I just tried out the sandbox on a machine wrunning 4.0 in production and 5.0.21 in the sandbox. It worked like a charm (would we expect no less from a "datacharmer"?).
|Thanks for infromation. I am just looking for such a tool to make a safe debugging.|
One of the cases that may happen, but only in some Linux distributions, is that a old version sandbox will complain about something along the lines of not finding a file that actually exists.
Well Guiseppe, greetings from Sweden. I just downloaded your tutorial on the sandbox and was hot and ready to do som serious studying, but I got as far as $ ./install.pl and there the fun ended. I could not get that install file to work no matter what. When I use run install.pl in WindowsXp it opens the file as notebook file. Now that helps me a lot. The info file also states just run the file, but not how! I hope someone has an answer for me, I am aware that once you know how it is very simple.
Best regards, Gerd Rein.
Greetings from Sardinia, Italy.
the requirements say that you need a Unix box for the Sandbox.
It does not work on Windows.
This is great stuff.
One very useful application that I can see (and will try soon) is to put the sandbox on another physical hard drive, and run the sandbox as a MySQL slave of the production dB on the primary drive.
I just cant get the ./start_replication working well.
It keeps telling me the following errors.
installing and starting master
Can't use string ("server-id=1") as an ARRAY ref while "strict refs" in use at ./install.pl line 506.
error installing the master
Executing ./install.pl --basedir=/home/testuser/mysqlpackages/5.1.24 \