Using MySQL Sandbox with Percona Server

One of the most useful tools if you’re working with multiple versions of MySQL Servers is MySQL Sandbox which allows you to maintain many different versions of MySQL, Percona Server, MariaDB. If you’re just working with single sandbox you can just use MySQL Sandbox in its most basic way and it will work:

However if you want to have multiple Sandboxes for MySQL, Percona Server, MariaDB sharing the the same version it is not going to work as there will be conflict in the directory name MySQL Sandbox is using as well as port it is using. –add_prefix Can be used to solve first problem and often it can be good enough as you might want to have many Sandboxes created for testing but only run those you need:

If you’re looking to solve the port conflict you will need to look at the low_level_make_sandbox script which make_sandbox generates and call it directly passing different port to it, for example:

If you’re looking to create Replication Sandbox you might need to change –sandbox_base_port option to avoid conflicts if you’re having multiple sandboxes for MySQL, Percona Server, MariaDB of the same version, however you do not need to worry about directory conflict as MySQL Sandbox will use different names by default in this case, containing product name too and not only version:

So with few simple options I can get sandboxes set up for all different MySQL variants which is a great help if you’re involved in support of many MySQL environments and need to be able to test for behavior differences quickly.

Share this post

Comments (3)

Leave a Reply