MySQL Sandbox
Certainly staying on top of the latest version of PHP, MySQL and other packages allows for quicker, efficient, secure and robust development. It can also cause a problem: backwards compatibility.
This brings me to a situation we had sometime ago, a client approached to re-develop their site in Drupal (which is no problem for us), the only constraint was that their current server is running MySQL 4.1, and like I mentioned I'm trying to keep up with the latest and newest version, so naturally we're running 5.1.
While in reality this would not be an issue, I've had so many sour experiences with missing PHP extensions, different Apache versions, even different Linux distributions.
So how to resolve this MySQL dilemma? My first option was to install another instance of MySQL and add another port and socket, sounds easy enough. Wrong, it is a very tedious and confusing process (well at least for me), lack of proper documentation, endless number of packages, not to mention fiddling on a dev server while developers are working and testing and/or clients reviewing, etc, etc.
And that's when I found MySQL Sandbox, as they describe it "MySQL Sandbox is a tool that installs one or more MySQL servers within seconds, easily, securely, and with full control."
All you need to do is download MySQL Sandbox, install, download the version of MySQL you need (version 3 till whatever is out now), run MySQL sandbox with the version of MySQL you want and viola! You have a separate instance of MySQL. You can connect just by changing the port number and socket to the version of MySQL you want to run (e.g if the version is 4.1.22 your port will be 4122).
The setup is very seamless, you must have Python installed, and then add the MySQL Sandbox start script to your Linux startup so it loads back up in case your server takes a fall in the middle of the night.
The only issue I've found so far is that it keeps the created Databases on RAM/VRAM so once you reboot your server your MySQL Sandbox DB's disappear. So it should not be used for production purposes, I believe with some work you can probably set up the Sandbox for production, although I would not recommend it.
Feel free to comment or ask questions via our contact form.
- andres's blog
- Login to post comments