Cheating mysqlsandbox to install MariaDB 10.0

March 17, 2013

mysqlsandbox is version-aware. The new 5.6 version, for example, requires special care because of the system InnoDB tables or otherwise modified system tables.

At this moment, it will refuse to install MariaDB 10.0 (alpha):

bash$ make_sandbox /tmp/mariadb-10.0.1-linux-x86_64.tar.gz 
unpacking /tmp/mariadb-10.0.1-linux-x86_64.tar.gz
unsupported version 10.0

This is perfectly legitimate, and I have no quarrel with this fact. However, I did want to setup MariaDB 10.0 as a sandbox.

As it turns out mysqlsandbox relies on MySQL package naming conventions to detect the version: the fact that a tgz file distribution is named mariadb-10.0.1-linux-x86_64.tar.gz and extracts onto mariadb-10.0.1-linux-x86_64, tells mysqlsandbox that this is version 10.0.1. Easy enough to cheat, then: pick a version that mysqlsandbox will work with, and which is compatible sandbox-wise with your own, and do the renames. For that matter, I picked 5.5, and, actually, made it 5.5.100:

bash:/tmp$ tar xzf mariadb-10.0.1-linux-x86_64.tar.gz
bash:/tmp$ mv mariadb-10.0.1-linux-x86_64 mariadb-5.5.100-linux-x86_64
bash:/tmp$ tar czf /tmp/mariadb-5.5.100-linux-x86_64.tar.gz ./mariadb-5.5.100-linux-x86_64
bash:/tmp$ make_sandbox mariadb-5.5.100-linux-x86_64.tar.gz 

unpacking /tmp/mariadb-5.5.100-linux-x86_64.tar.gz
Executing low_level_make_sandbox --basedir=/tmp/5.5.100 \
        --sandbox_directory=msb_5_5_100 \
        --install_version=5.5 \
        --sandbox_port=55100 \
        --no_ver_after_name \
        --my_clause=log-error=msandbox.err
>>/tmp
    The MySQL Sandbox,  version 3.0.29
    (C) 2006-2013 Giuseppe Maxia
installing with the following parameters:
upper_directory                = /home/shlomi/sandboxes
sandbox_directory              = msb_5_5_100
sandbox_port                   = 55100
check_port                     = 
no_check_port                  = 
datadir_from                   = script
install_version                = 5.5
basedir                        = /tmp/5.5.100
tmpdir                         = 
my_file                        = 
operating_system_user          = shlomi
db_user                        = msandbox
remote_access                  = 127.%
ro_user                        = msandbox_ro
rw_user                        = msandbox_rw
repl_user                      = rsandbox
db_password                    = msandbox
repl_password                  = rsandbox
my_clause                      = log-error=msandbox.err
master                         = 
slaveof                        = 
high_performance               = 
prompt_prefix                  = mysql
prompt_body                    =  [\h] {\u} (\d) > 
force                          = 
no_ver_after_name              = 1
verbose                        = 
load_grants                    = 1
no_load_grants                 = 
no_run                         = 
no_show                        = 
do you agree? ([Y],n)

It worked well for me; perhaps I'm missing on something, so watch your own setup.

tags: ,
posted in MySQL by shlomi

« | »

Follow comments via the RSS Feed | Leave a comment | Trackback URL

3 Comments to "Cheating mysqlsandbox to install MariaDB 10.0"

  1. vishnu wrote:

    cool hack :)

  2. Daniël van Eeden wrote:

    I've extracted MariaDB 10 to ~/opt/mysql/5.5.100-mariadb and then used "make_sandbox 5.5.100-mariadb" to create the sandbox. The suffix makes it easier to see the mysql flavour.

  3. Giuseppe Maxia wrote:

    MySQL Sandbox 3.0.34 includes support for MariaDB 10.0.

Leave Your Comment

 

 
Powered by Wordpress and MySQL. Theme by openark.org