{"id":507,"date":"2010-03-16T16:31:49","date_gmt":"2010-03-16T15:31:49","guid":{"rendered":"http:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/"},"modified":"2010-03-16T16:31:49","modified_gmt":"2010-03-16T15:31:49","slug":"the-mysql-sandbox","status":"publish","type":"post","link":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/","title":{"rendered":"The MySQL Sandbox"},"content":{"rendered":"<p><span class='imgright'><img alt='' src='http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif' \/><\/span><\/p>\n<p>I learned about <b>the MySQL Sandbox<\/b> last year in Lisbon for the <a href=\"http:\/\/yapceurope2009.org\/ye2009\/\" rel=\"nofollow\">European Perl conference<\/a>. I remember I talked about it with <a href=\"http:\/\/datacharmer.blogspot.com\" rel=\"nofollow\">Giuseppe Maxia<\/a>, the original author. I promised him to try it.<\/p>\n<p>I wasn&#39;t really convinced about it until the first time I tried it.<\/p>\n<p>That was when on My Opera we switched from master-slave to <a href=\"\/devblog\/blog\/my-opera-now-running-on-a-master-to-master-replication-setup\" rel=\"nofollow\">master-master replication<\/a>. It was during a weekend last November. I was a bit scared of doing the switch. Then I remembered about MySQL Sandbox, and I tried it on an old laptop.<\/p>\n<p>I was <b>absolutely amazed<\/b> to discover that I could simulate pretty much any setup, from simple to complex, master-slave, master-master, circular multi-master, etc&#8230;<br \/>\nIt was also very quick to setup, and it&#39;s also very fast to install new sandboxed servers.<br \/>\nYou can setup a 5 servers replication setup in less than 30 seconds.<\/p>\n<p><a href=\"http:\/\/search.cpan.org\/dist\/MySQL-Sandbox\" rel=\"nofollow\">MySQL Sandbox<\/a> is a Perl tool that you can easily install from <a href=\"http:\/\/search.cpan.org\/\" rel=\"nofollow\">CPAN<\/a> with:<br \/>\n<code><\/p>\n<pre>\r\n$ sudo cpan MySQL-Sandbox\r\n<\/pre>\n<p><\/code><\/p>\n<p>You get the <code>make_sandbox<\/code> command that allows you to create new sandboxes. Right now I&#39;m trying it again for a maintainance operation we have to do on My Opera soon. I&#39;m using the master-master setup like this:<\/p>\n<p><code><\/p>\n<pre>\r\nmake_replication_sandbox --master_master --server-version=\/home\/cosimo\/mysql\/mysql-5.0.51a-....tar.gz\r\n<\/pre>\n<p><\/code><\/p>\n<p>so I can simulate the entire operation and try to minimize the risk of messing up the production boxes while also getting a bit more confident about these procedures.<\/p>\n<p>MySQL Sandbox, try it. You won&#39;t go back :-)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I learned about the MySQL Sandbox last year in Lisbon for the European Perl conference. I remember I talked about it with Giuseppe Maxia, the original author. I promised him to try it. I wasn&#39;t really convinced about it until the first time I tried it. That was when on My Opera we switched from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[58,472,474,475,89,54,473,476],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>The MySQL Sandbox - Random hacking<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"The MySQL Sandbox - Random hacking\" \/>\n<meta property=\"og:description\" content=\"I learned about the MySQL Sandbox last year in Lisbon for the European Perl conference. I remember I talked about it with Giuseppe Maxia, the original author. I promised him to try it. I wasn&#039;t really convinced about it until the first time I tried it. That was when on My Opera we switched from [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\" \/>\n<meta property=\"og:site_name\" content=\"Random hacking\" \/>\n<meta property=\"article:published_time\" content=\"2010-03-16T15:31:49+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif\" \/>\n<meta name=\"author\" content=\"cosimo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"cosimo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\"},\"author\":{\"name\":\"cosimo\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"headline\":\"The MySQL Sandbox\",\"datePublished\":\"2010-03-16T15:31:49+00:00\",\"dateModified\":\"2010-03-16T15:31:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\"},\"wordCount\":236,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"image\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif\",\"keywords\":[\"database\",\"gmax\",\"maintainance\",\"master\",\"myopera\",\"mysql\",\"sandbox\",\"slave\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\",\"name\":\"The MySQL Sandbox - Random hacking\",\"isPartOf\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif\",\"datePublished\":\"2010-03-16T15:31:49+00:00\",\"dateModified\":\"2010-03-16T15:31:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage\",\"url\":\"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif\",\"contentUrl\":\"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The MySQL Sandbox\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#website\",\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/\",\"name\":\"Random hacking\",\"description\":\"Assume nothing. Code defensively. Keep it simple, stupid!\",\"publisher\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1\",\"name\":\"cosimo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g\",\"caption\":\"cosimo\"},\"logo\":{\"@id\":\"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"The MySQL Sandbox - Random hacking","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/","og_locale":"en_US","og_type":"article","og_title":"The MySQL Sandbox - Random hacking","og_description":"I learned about the MySQL Sandbox last year in Lisbon for the European Perl conference. I remember I talked about it with Giuseppe Maxia, the original author. I promised him to try it. I wasn&#39;t really convinced about it until the first time I tried it. That was when on My Opera we switched from [&hellip;]","og_url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/","og_site_name":"Random hacking","article_published_time":"2010-03-16T15:31:49+00:00","og_image":[{"url":"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif"}],"author":"cosimo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"cosimo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#article","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/"},"author":{"name":"cosimo","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"headline":"The MySQL Sandbox","datePublished":"2010-03-16T15:31:49+00:00","dateModified":"2010-03-16T15:31:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/"},"wordCount":236,"commentCount":0,"publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"image":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage"},"thumbnailUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif","keywords":["database","gmax","maintainance","master","myopera","mysql","sandbox","slave"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/","url":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/","name":"The MySQL Sandbox - Random hacking","isPartOf":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage"},"image":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage"},"thumbnailUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif","datePublished":"2010-03-16T15:31:49+00:00","dateModified":"2010-03-16T15:31:49+00:00","breadcrumb":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#primaryimage","url":"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif","contentUrl":"http:\/\/files.myopera.com\/cstrep\/blog\/datacharmer_small.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/2010\/03\/the-mysql-sandbox\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.streppone.it\/cosimo\/blog\/"},{"@type":"ListItem","position":2,"name":"The MySQL Sandbox"}]},{"@type":"WebSite","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#website","url":"https:\/\/www.streppone.it\/cosimo\/blog\/","name":"Random hacking","description":"Assume nothing. Code defensively. Keep it simple, stupid!","publisher":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.streppone.it\/cosimo\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/c443bedbf6ecf99550d6395620801df1","name":"cosimo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cb1d938720df45a2720724aae99e3bfc?s=96&r=g","caption":"cosimo"},"logo":{"@id":"https:\/\/www.streppone.it\/cosimo\/blog\/#\/schema\/person\/image\/"},"url":"https:\/\/www.streppone.it\/cosimo\/blog\/author\/cosimo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/507"}],"collection":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/comments?post=507"}],"version-history":[{"count":0,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/posts\/507\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/media?parent=507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/categories?post=507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.streppone.it\/cosimo\/blog\/wp-json\/wp\/v2\/tags?post=507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}