{"id":6139,"date":"2013-03-17T08:19:50","date_gmt":"2013-03-17T06:19:50","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=6139"},"modified":"2013-03-17T08:19:50","modified_gmt":"2013-03-17T06:19:50","slug":"cheating-mysqlsandbox-to-install-mariadb-10-0","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/cheating-mysqlsandbox-to-install-mariadb-10-0","title":{"rendered":"Cheating mysqlsandbox to install MariaDB 10.0"},"content":{"rendered":"<p><em>mysqlsandbox<\/em> is version-aware. The new <strong>5.6<\/strong> version, for example, requires <a href=\"http:\/\/datacharmer.blogspot.co.il\/2012\/09\/mysql-sandbox-updated-with-minimal.html\">special<\/a> <a href=\"http:\/\/datacharmer.blogspot.co.il\/2013\/02\/mysql-sandbox-3030-now-adapted-to-work.html\">care<\/a> because of the system InnoDB tables or otherwise modified system tables.<\/p>\n<p>At this moment, it will refuse to install MariaDB <strong>10.0<\/strong> (alpha):<\/p>\n<blockquote>\n<pre><strong>bash$<\/strong> make_sandbox \/tmp\/mariadb-10.0.1-linux-x86_64.tar.gz \r\nunpacking \/tmp\/mariadb-10.0.1-linux-x86_64.tar.gz\r\n<span style=\"color: #800000;\">unsupported version 10.0<\/span><\/pre>\n<\/blockquote>\n<p>This is perfectly legitimate, and I have no quarrel with this fact. However, I did want to setup MariaDB <strong>10.0<\/strong> as a sandbox.<\/p>\n<p>As it turns out <em>mysqlsandbox<\/em> relies on MySQL package naming conventions to detect the version: the fact that a <strong>tgz<\/strong> file distribution is named <strong>mariadb-10.0.1-linux-x86_64.tar.gz<\/strong> and extracts onto <strong>mariadb-10.0.1-linux-x86_64<\/strong>, tells <em>mysqlsandbox<\/em> that this is version <strong>10.0.1<\/strong>. Easy enough to cheat, then: pick a version that <em>mysqlsandbox<\/em> will work with, and which is compatible sandbox-wise with your own, and do the renames. For that matter, I picked <strong>5.5<\/strong>, and, actually, made it <strong>5.5.100<\/strong>:<!--more--><\/p>\n<blockquote>\n<pre><strong>bash:\/tmp$<\/strong> tar xzf <span style=\"color: #800000;\">mariadb-10.0.1-linux-x86_64.tar.gz<\/span>\r\n<strong>bash:\/tmp$<\/strong> mv <span style=\"color: #800000;\">mariadb-10.0.1-linux-x86_64<\/span> <span style=\"color: #000080;\">mariadb-5.5.100-linux-x86_64<\/span>\r\n<strong>bash:\/tmp$<\/strong> tar czf <span style=\"color: #000080;\">\/tmp\/mariadb-5.5.100-linux-x86_64.tar.gz<\/span> <span style=\"color: #000080;\">.\/mariadb-5.5.100-linux-x86_64<\/span>\r\n<strong>bash:\/tmp$<\/strong> make_sandbox <span style=\"color: #000080;\">mariadb-5.5.100-linux-x86_64.tar.gz<\/span> \r\n\r\nunpacking \/tmp\/mariadb-5.5.100-linux-x86_64.tar.gz\r\nExecuting low_level_make_sandbox --basedir=\/tmp\/5.5.100 \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 --sandbox_directory=msb_5_5_100 \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #339966;\">--install_version=5.5<\/span> \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 --sandbox_port=55100 \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 --no_ver_after_name \\\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 --my_clause=log-error=msandbox.err\r\n&gt;&gt;\/tmp\r\n\u00a0\u00a0\u00a0 The MySQL Sandbox,\u00a0 version 3.0.29\r\n\u00a0\u00a0\u00a0 (C) 2006-2013 Giuseppe Maxia\r\ninstalling with the following parameters:\r\nupper_directory\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \/home\/shlomi\/sandboxes\r\nsandbox_directory\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = msb_5_5_100\r\nsandbox_port\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 55100\r\ncheck_port\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nno_check_port\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\ndatadir_from\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = script\r\ninstall_version\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 5.5\r\nbasedir\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \/tmp\/5.5.100\r\ntmpdir\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nmy_file\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\noperating_system_user\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = shlomi\r\ndb_user\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = msandbox\r\nremote_access\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 127.%\r\nro_user\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = msandbox_ro\r\nrw_user\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = msandbox_rw\r\nrepl_user\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = rsandbox\r\ndb_password\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = msandbox\r\nrepl_password\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = rsandbox\r\nmy_clause\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = log-error=msandbox.err\r\nmaster\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nslaveof\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nhigh_performance\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nprompt_prefix\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = mysql\r\nprompt_body\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 =\u00a0 [\\h] {\\u} (\\d) &gt; \r\nforce\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nno_ver_after_name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 1\r\nverbose\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nload_grants\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = 1\r\nno_load_grants\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nno_run\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\nno_show\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = \r\ndo you agree? ([Y],n)<\/pre>\n<\/blockquote>\n<p>It worked well for me; perhaps I&#8217;m missing on something, so watch your own setup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[5],"tags":[74,100],"class_list":["post-6139","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-hack","tag-tools"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-1B1","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6139","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=6139"}],"version-history":[{"count":5,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6139\/revisions"}],"predecessor-version":[{"id":6163,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6139\/revisions\/6163"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=6139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=6139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=6139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}