SlideShare a Scribd company logo
MySQL Sandbox
A toolkit for
productive laziness
Giuseppe Maxia
QA Director, Continuent, Inc




                   This work is licensed under the Creative Commons
                   Attribution-Share Alike 3.0 Unported License. To view a
                   copy of this license, visit http://creativecommons.org/
                   licenses/by-sa/3.0/ or send a letter to Creative Commons,
                   171 Second Street, Suite 300, San Francisco, California,
                   94105, USA.
Tuesday, October 25, 11
about me - Giuseppe Maxia
 •       a.k.a. The Data Charmer
 •       QA Director at Continuent, Inc
 •       Long time hacking with MySQL features
 •       Formerly, community manager,db consultant, designer,
         coder.
 •       A passion for QA and open source
 •       Blogger
 • http://datacharmer.blogspot.com


Tuesday, October 25, 11
Laziness
         Laziness is a disinclination to
         activity or exertion despite
         having the ability to do so.



         http://en.wikipedia.org/wiki/Laziness
Tuesday, October 25, 11
I am an experienced DBA




Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.




Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.
                     • In the same host.




Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.
                     • In the same host.
                     • Without conflicting.




Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.
                     • In the same host.
                     • Without conflicting.
                     • Manually.



Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.
                     • In the same host.
                     • Without conflicting.
                     • Manually.
                     • Do I feel inclined to do so?


Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.
                     • In the same host.
                     • Without conflicting.
                     • Manually.
                     • Do I feel inclined to do so?
                     • Several times a day?

Tuesday, October 25, 11
I am an experienced DBA
                     • I have the ability of installing
                          multiple MySQL servers.
                     • In the same host.
                     • Without conflicting.
                     • Manually.
                     • Do I feel inclined to do so?
                     • Several times a day?
                     • I DON'T THINK SO.
Tuesday, October 25, 11
I am a command line wizard




Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers




Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers
                     • I can use them




Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers
                     • I can use them
                     • with various long options.




Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers
                     • I can use them
                     • with various long options.
                     • Manually.



Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers
                     • I can use them
                     • with various long options.
                     • Manually.
                     • Do I feel inclined to do so?


Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers
                     • I can use them
                     • with various long options.
                     • Manually.
                     • Do I feel inclined to do so?
                     • Many dozen times a day?

Tuesday, October 25, 11
I am a command line wizard

                     • After installing multiple servers
                     • I can use them
                     • with various long options.
                     • Manually.
                     • Do I feel inclined to do so?
                     • Many dozen times a day?
                     • I DEFINITELY DON'T THINK SO.
Tuesday, October 25, 11
I can set up replication




Tuesday, October 25, 11
I can set up replication


                     • Almost without errors.




Tuesday, October 25, 11
I can set up replication


                     • Almost without errors.
                     • And then I can connect to masters
                          and slaves with long options on the
                          command line.




Tuesday, October 25, 11
I can set up replication


                     • Almost without errors.
                     • And then I can connect to masters
                          and slaves with long options on the
                          command line.
                     • Do I feel inclined to do so?


Tuesday, October 25, 11
I can set up replication


                     • Almost without errors.
                     • And then I can connect to masters
                          and slaves with long options on the
                          command line.
                     • Do I feel inclined to do so?
                     • I DON'T THINK SO.

Tuesday, October 25, 11
I have the ability




Tuesday, October 25, 11
I have the ability

                     • but I don't feel inclined to do repetitive
                          work




Tuesday, October 25, 11
I have the ability

                     • but I don't feel inclined to do repetitive
                          work
                     • I ADMIT IT: I AM LAZY



Tuesday, October 25, 11
I have the ability

                     • but I don't feel inclined to do repetitive
                          work
                     • I ADMIT IT: I AM LAZY



Tuesday, October 25, 11
A lazy developer ®


        Someone who writes 12,000
        lines of code to spare himself
        the trouble of typing 15 lines
        on a terminal.


Tuesday, October 25, 11
A lazy developer ®


        Someone who writes 12,000
        lines of code to spare himself (*)
        the trouble of typing 15 lines
        on a terminal.
(*) And another 1,000,000 people
Tuesday, October 25, 11
That's me




Tuesday, October 25, 11
MySQL Sandbox
                          http://mysqlsandbox.net
             • Free software (Perl under GPL)
             • One (unix) host
             • Many database servers
             • Single or multiple sandboxes
             • Customized scripts to use the servers
             • Standard or circular replication
             • Installs IN SECONDS
Tuesday, October 25, 11
overview

        MySQL                                           MySQL
        server                                          server
            Data          DB1                    Data       DB1




            DB2           DB3
                                DATA DIRECTORY   DB2        DB3




                                     PORT


                                     SOCKET

Tuesday, October 25, 11
overview

        MySQL                                                 MySQL
        server                                                server
            Data          DB1
                                       SAME            Data       DB1




            DB2           DB3
                                       DATA            DB2        DB3

                                    DIRECTORY?
  /var/lib/mysql                                 /var/lib/mysql




                                DATA CORRUPTION
Tuesday, October 25, 11
overview

        MySQL                                         MySQL
        server                                        server

                                      SAME
                                     PORT or
                                     SOCKET?
                          3306                      3306


 /tmp/mysql.sock                               /tmp/mysql.sock

                                 DOES NOT START
Tuesday, October 25, 11
The hard way (1)




Tuesday, October 25, 11
the hard way (2)




Tuesday, October 25, 11
The easy way
     $ make_sandbox 
                     /path/to/mysql-5.1.54_linux.tar.gz


     $ make_sandbox 
                     Percona-Server-5.1.54_linux.tar.gz


     # it should work always




Tuesday, October 25, 11
The easier way
     $ make_sandbox 5.1.54




     # Needs some preliminary work




Tuesday, October 25, 11
The easiest way
     $ sb 5.1.54




     # Needs the same preliminary work




Tuesday, October 25, 11
MySQL Sandbox
                                                        VERSION
                                               MySQL
                                               server
           Data           DB1




            DB2           DB3
                                $SANDBOX_HOME/msb_VERSION/data


                                                         VERSION


                                      /tmp/mysql_VERSION.sock

Tuesday, October 25, 11
MySQL Sandbox
                                                       5.1.54
                                              MySQL
                                              server
           Data           DB1




            DB2           DB3
                                $SANDBOX_HOME/msb_5_1_54/data


                                                          5154


                                        /tmp/mysql_5154.sock

Tuesday, October 25, 11
MySQL Sandbox
                                                       5.5.9
                                              MySQL
                                              server
           Data           DB1




            DB2           DB3
                                $SANDBOX_HOME/msb_5_5_09/data


                                                         5509


                                        /tmp/mysql_5509.sock

Tuesday, October 25, 11
Single Sandbox
             MySQL            customized scripts
             server


     start
     stop
    restart
    status
     clear
   send_kill
      use

Tuesday, October 25, 11
Multiple Sandbox
            MySQL              customized scripts
            server


      start_all
      stop_all
     restart_all m n1
     status_all s1 n2
      clear_all  s2 n3
     send_kill_a
         ll
       use_all
Tuesday, October 25, 11
Where do you get it


        •from CPAN
              sudo cpan MySQL::Sandbox

        •from launchpad
              http://launchpad.net/mysql-sandbox




Tuesday, October 25, 11
The easy replication way
     $ make_replication_sandbox 
                     /path/to/mysql-5.1.54_linux.tar.gz


     # or, after some preparation


     $ make_replication_sandbox 5.1.54




Tuesday, October 25, 11
default architecture
                                            $HOME




                               /sandboxes            opt
                                                                 expanded
                                                                  tarballs
                          $SANDBOX_HOME
                                                    mysql


                                               $SANDBOX_BINARY
          installed
         sandboxes

Tuesday, October 25, 11
default architecture
                                                    $HOME



                                       /sandboxes            opt



                          msb_5_0_91
                                                            mysql
                          msb_5_1_48
                                                                    5.0.91
                          rsandbox_5_1_48
                                                                    5.1.45
                                 master
                                                                    5.1.48
                                 node1
                                                                    5.5.4
                                 node2
Tuesday, October 25, 11
Tuesday, October 25, 11
creating a single sandbox
                 make_sandbox 
                    /path/to/mysql-X.X.XX-OS.tar.gz




Tuesday, October 25, 11
using a single sandbox
                 # after
                 # make_sandbox 
                 #   /path/to/mysql-X.X.XX-OS.tar.gz

                 $ cd $SANDBOX_HOME/msb_X_X_XX
                 $ ./use




Tuesday, October 25, 11
creating a single sandbox
                          with a specific options file

                 make_sandbox 
                    /path/to/mysql-X.X.XX-OS.tar.gz 
                    -- --my_file=/path/to/my.cnf




Tuesday, October 25, 11
easily create a sandbox after the first
                       one
                          The long way
 $ cd $HOME/opt/mysql   # $SANDBOX_BINARY
 $   gunzip -c 
   /path/to/mysql-5.1.34-osx10.5-x86.tar.gz 
    | tar -xf -
 $ mv mysql-5.1.34-osx10.5-x86 5.1.34
 $ make sandbox 5.1.34




Tuesday, October 25, 11
easily create a sandbox after the first
                       one
                          The short way
 $ make_sandbox --export_binaries 
   path/to/mysql-5.1.34-osx10.5-x86.tar.gz




Tuesday, October 25, 11
starting a single sandbox
                 $ cd $SANDBOX_HOME/msb_X_X_XX
                 $ ./start




Tuesday, October 25, 11
starting a single sandbox
                          with temporary options
                 $ cd $SANDBOX_HOME/msb_X_X_XX
                 $ ./start --option=value


                 $ ./restart --option=value


                 $ ./start --key-buffer=20000000




Tuesday, October 25, 11
creating a sandbox with custom port
                 and directory
                 $ make_sandbox 5.1.34 -- 
                    --sandbox_port=7800 
                    --sandbox_directory=mickeymouse




Tuesday, October 25, 11
creating a sandbox with automatic
                      port checking
                 $ make_sandbox 5.1.34 -- --check_port


                 # if 5.1.34 is free
                 #    port=5134
                 #    directory=msb_5_1_34
                 # else
                 #    port=5135 (or the first free)
                 #    directory=msb_5_1_34_a




Tuesday, October 25, 11
create a replication sandbox


 $ make_replication_sandbox 
   path/to/mysql-5.1.34-osx10.5-x86.tar.gz




Tuesday, October 25, 11
create a circular replication sandbox


 $ make_replication_sandbox 
   --circular=4 
   path/to/mysql-5.1.34-osx10.5-x86.tar.gz




Tuesday, October 25, 11
changing port to an existing sandbox


 $ sbtool -o port 
     -s /path/to/source/sandbox 
     --new_port=XXXX




Tuesday, October 25, 11
installing the innodb plugin


 $ sbtool -o plugin 
     --plugin=innodb 
     -s /path/to/source/sandbox




Tuesday, October 25, 11
creating a replication sandbox with
                     new base port

 $ make_replication_sandbox 
     --replication_directory=newwdir 
     --check_base_port 5.0.79

 #       Creates a replication directory under
 #       $SANDBOX_HOME/newdir
 #       The previous one is preserved.
 #       No conflicts happen

Tuesday, October 25, 11
more recipes


 $ perldoc MySQL::Sandbox::Recipes




Tuesday, October 25, 11
MySQL Sandbox evolution




Tuesday, October 25, 11
Tungsten Sandbox




Tuesday, October 25, 11
replicator
                                            1



                                        replicator
                          TSB               2



                                        replicator
                                            3

                                                     database
              HOME                                       1




                                                     database
                           sandboxes   base_dir          2




                                                     database
                                                         3




Tuesday, October 25, 11
tungsten sandbox help
 ./tools/tungsten-sandbox -h
 USAGE: ./tools/tungsten-sandbox [flags] args
 flags:
   -n,--nodes: how many nodes to install (default: 3)
   -m,--mysql_version: which MySQL version to use (default: '5.5.13')
   -t,--tungsten_base: where to install the sandbox (default: '$HOME/tsb2/')
   -d,--group_dir: sandbox group directory name (default: 'tr_dbs')
   -x,--tsb_prefix: Tungsten Sandbox prefix (default: 'db')
   -s,--service: how the service is named (default: 'tsandbox')
   -P,--base_port: port base for MySQL sandbox nodes (default: 7100)
   -l,--thl_port: port for the THL service (default: 12110)
   -r,--rmi_port: port for the RMI service (default: 10100)
   -v,--[no]version: show Tungsten sandbox version (default: false)
   -h,--[no]help: show Tungsten sandbox help (default: false)




Tuesday, October 25, 11
tungsten sandbox
 $ ./tools/tungsten-sandbox -m 5.5.10
 executing "clear" on node 1
 executing "clear" on node 2
 executing "clear" on node 3
 installing node 1
 installing node 2
 installing node 3
 group directory installed in $HOME/sandboxes/tr_dbs




Tuesday, October 25, 11
tungsten sandbox
 ls ~/tsb2
 clear_tsandbox
 db1 db2 db3
 db_clear_all db_send_kill_all db_start_all
 db_status_all db_stop_all db_use_all
 n1 n2 n3 replicator_all start_tsandbox trepctl_all




Tuesday, October 25, 11
Participate!




Tuesday, October 25, 11
Participate!




Tuesday, October 25, 11
THANKS
                                                                                 Let's talk!




 This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://
 creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California,
 94105, USA.
Tuesday, October 25, 11
Ad

More Related Content

What's hot (12)

A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
Chris Skardon
 
COMM 118 - Writing for a VO (Broadcast Journalism)
COMM 118 - Writing for a VO (Broadcast Journalism)COMM 118 - Writing for a VO (Broadcast Journalism)
COMM 118 - Writing for a VO (Broadcast Journalism)
profluther
 
EclipseCon Europe 2011
EclipseCon Europe 2011EclipseCon Europe 2011
EclipseCon Europe 2011
Sigasi
 
Rapid Evolution of Web Dev? aka Talking About The Web
Rapid Evolution of Web Dev? aka Talking About The WebRapid Evolution of Web Dev? aka Talking About The Web
Rapid Evolution of Web Dev? aka Talking About The Web
PINT Inc
 
Big Websites
Big WebsitesBig Websites
Big Websites
Four Kitchens
 
Ansible for Automation
Ansible for AutomationAnsible for Automation
Ansible for Automation
Jaykishan mutkawoa
 
Presentation about Overthere for J-Fall 2011
Presentation about Overthere for J-Fall 2011Presentation about Overthere for J-Fall 2011
Presentation about Overthere for J-Fall 2011
Vincent Partington
 
Inrastructure as Code
Inrastructure as CodeInrastructure as Code
Inrastructure as Code
Charles Anderson
 
Introduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWSIntroduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWS
WP Engine
 
In-house web automation?
In-house web automation?In-house web automation?
In-house web automation?
Adam Christian
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
Keynote ujihisa.vim#2
Keynote ujihisa.vim#2Keynote ujihisa.vim#2
Keynote ujihisa.vim#2
ujihisa
 
A tale of 3 databases
A tale of 3 databasesA tale of 3 databases
A tale of 3 databases
Chris Skardon
 
COMM 118 - Writing for a VO (Broadcast Journalism)
COMM 118 - Writing for a VO (Broadcast Journalism)COMM 118 - Writing for a VO (Broadcast Journalism)
COMM 118 - Writing for a VO (Broadcast Journalism)
profluther
 
EclipseCon Europe 2011
EclipseCon Europe 2011EclipseCon Europe 2011
EclipseCon Europe 2011
Sigasi
 
Rapid Evolution of Web Dev? aka Talking About The Web
Rapid Evolution of Web Dev? aka Talking About The WebRapid Evolution of Web Dev? aka Talking About The Web
Rapid Evolution of Web Dev? aka Talking About The Web
PINT Inc
 
Presentation about Overthere for J-Fall 2011
Presentation about Overthere for J-Fall 2011Presentation about Overthere for J-Fall 2011
Presentation about Overthere for J-Fall 2011
Vincent Partington
 
Introduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWSIntroduction to scaling your WordPress site past a single node using AWS
Introduction to scaling your WordPress site past a single node using AWS
WP Engine
 
In-house web automation?
In-house web automation?In-house web automation?
In-house web automation?
Adam Christian
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
Keynote ujihisa.vim#2
Keynote ujihisa.vim#2Keynote ujihisa.vim#2
Keynote ujihisa.vim#2
ujihisa
 

Viewers also liked (9)

MySQL in your laptop
MySQL in your laptopMySQL in your laptop
MySQL in your laptop
Giuseppe Maxia
 
Script it
Script itScript it
Script it
Giuseppe Maxia
 
Juggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorJuggle your data with Tungsten Replicator
Juggle your data with Tungsten Replicator
Giuseppe Maxia
 
Synchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBSynchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDB
Giuseppe Maxia
 
The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...
Brian Solis
 
Open Source Creativity
Open Source CreativityOpen Source Creativity
Open Source Creativity
Sara Cannon
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
maditabalnco
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
Barry Feldman
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
Helge Tennø
 
Juggle your data with Tungsten Replicator
Juggle your data with Tungsten ReplicatorJuggle your data with Tungsten Replicator
Juggle your data with Tungsten Replicator
Giuseppe Maxia
 
Synchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDBSynchronise your data between MySQL and MongoDB
Synchronise your data between MySQL and MongoDB
Giuseppe Maxia
 
The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...
Brian Solis
 
Open Source Creativity
Open Source CreativityOpen Source Creativity
Open Source Creativity
Sara Cannon
 
Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)Reuters: Pictures of the Year 2016 (Part 2)
Reuters: Pictures of the Year 2016 (Part 2)
maditabalnco
 
The Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post FormatsThe Six Highest Performing B2B Blog Post Formats
The Six Highest Performing B2B Blog Post Formats
Barry Feldman
 
The Outcome Economy
The Outcome EconomyThe Outcome Economy
The Outcome Economy
Helge Tennø
 
Ad

More from Giuseppe Maxia (20)

MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployer
Giuseppe Maxia
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
Giuseppe Maxia
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installer
Giuseppe Maxia
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
Giuseppe Maxia
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
Giuseppe Maxia
 
Dbdeployer
DbdeployerDbdeployer
Dbdeployer
Giuseppe Maxia
 
A quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesA quick tour of Mysql 8 roles
A quick tour of Mysql 8 roles
Giuseppe Maxia
 
MySQL document_store
MySQL document_storeMySQL document_store
MySQL document_store
Giuseppe Maxia
 
Replication skeptic
Replication skepticReplication skeptic
Replication skeptic
Giuseppe Maxia
 
Tungsten Replicator tutorial
Tungsten Replicator tutorialTungsten Replicator tutorial
Tungsten Replicator tutorial
Giuseppe Maxia
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungsten
Giuseppe Maxia
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usability
Giuseppe Maxia
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with Tungsten
Giuseppe Maxia
 
State of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringState of the art of MySQL replication and clustering
State of the art of MySQL replication and clustering
Giuseppe Maxia
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
Giuseppe Maxia
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replication
Giuseppe Maxia
 
Lightning talks percona live mysql_2012
Lightning talks percona live mysql_2012Lightning talks percona live mysql_2012
Lightning talks percona live mysql_2012
Giuseppe Maxia
 
Replication 101
Replication 101Replication 101
Replication 101
Giuseppe Maxia
 
Testing early mysql releases in a sandbox
Testing early mysql releases in a sandboxTesting early mysql releases in a sandbox
Testing early mysql releases in a sandbox
Giuseppe Maxia
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
Giuseppe Maxia
 
MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployer
Giuseppe Maxia
 
Dbdeployer, the universal installer
Dbdeployer, the universal installerDbdeployer, the universal installer
Dbdeployer, the universal installer
Giuseppe Maxia
 
Test complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployerTest complex database systems in your laptop with dbdeployer
Test complex database systems in your laptop with dbdeployer
Giuseppe Maxia
 
A quick tour of Mysql 8 roles
A quick tour of Mysql 8 rolesA quick tour of Mysql 8 roles
A quick tour of Mysql 8 roles
Giuseppe Maxia
 
Tungsten Replicator tutorial
Tungsten Replicator tutorialTungsten Replicator tutorial
Tungsten Replicator tutorial
Giuseppe Maxia
 
Preventing multi master conflicts with tungsten
Preventing multi master conflicts with tungstenPreventing multi master conflicts with tungsten
Preventing multi master conflicts with tungsten
Giuseppe Maxia
 
MySQL high availability power and usability
MySQL high availability power and usabilityMySQL high availability power and usability
MySQL high availability power and usability
Giuseppe Maxia
 
Solving MySQL replication problems with Tungsten
Solving MySQL replication problems with TungstenSolving MySQL replication problems with Tungsten
Solving MySQL replication problems with Tungsten
Giuseppe Maxia
 
State of the art of MySQL replication and clustering
State of the art of MySQL replication and clusteringState of the art of MySQL replication and clustering
State of the art of MySQL replication and clustering
Giuseppe Maxia
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
Giuseppe Maxia
 
Mysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replicationMysql 5.5 and 5.6 replication
Mysql 5.5 and 5.6 replication
Giuseppe Maxia
 
Lightning talks percona live mysql_2012
Lightning talks percona live mysql_2012Lightning talks percona live mysql_2012
Lightning talks percona live mysql_2012
Giuseppe Maxia
 
Testing early mysql releases in a sandbox
Testing early mysql releases in a sandboxTesting early mysql releases in a sandbox
Testing early mysql releases in a sandbox
Giuseppe Maxia
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
Giuseppe Maxia
 
Ad

Recently uploaded (20)

TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 

MySQL Sandbox - A toolkit for productive laziness

  • 1. MySQL Sandbox A toolkit for productive laziness Giuseppe Maxia QA Director, Continuent, Inc This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/ licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. Tuesday, October 25, 11
  • 2. about me - Giuseppe Maxia • a.k.a. The Data Charmer • QA Director at Continuent, Inc • Long time hacking with MySQL features • Formerly, community manager,db consultant, designer, coder. • A passion for QA and open source • Blogger • http://datacharmer.blogspot.com Tuesday, October 25, 11
  • 3. Laziness Laziness is a disinclination to activity or exertion despite having the ability to do so. http://en.wikipedia.org/wiki/Laziness Tuesday, October 25, 11
  • 4. I am an experienced DBA Tuesday, October 25, 11
  • 5. I am an experienced DBA • I have the ability of installing multiple MySQL servers. Tuesday, October 25, 11
  • 6. I am an experienced DBA • I have the ability of installing multiple MySQL servers. • In the same host. Tuesday, October 25, 11
  • 7. I am an experienced DBA • I have the ability of installing multiple MySQL servers. • In the same host. • Without conflicting. Tuesday, October 25, 11
  • 8. I am an experienced DBA • I have the ability of installing multiple MySQL servers. • In the same host. • Without conflicting. • Manually. Tuesday, October 25, 11
  • 9. I am an experienced DBA • I have the ability of installing multiple MySQL servers. • In the same host. • Without conflicting. • Manually. • Do I feel inclined to do so? Tuesday, October 25, 11
  • 10. I am an experienced DBA • I have the ability of installing multiple MySQL servers. • In the same host. • Without conflicting. • Manually. • Do I feel inclined to do so? • Several times a day? Tuesday, October 25, 11
  • 11. I am an experienced DBA • I have the ability of installing multiple MySQL servers. • In the same host. • Without conflicting. • Manually. • Do I feel inclined to do so? • Several times a day? • I DON'T THINK SO. Tuesday, October 25, 11
  • 12. I am a command line wizard Tuesday, October 25, 11
  • 13. I am a command line wizard • After installing multiple servers Tuesday, October 25, 11
  • 14. I am a command line wizard • After installing multiple servers • I can use them Tuesday, October 25, 11
  • 15. I am a command line wizard • After installing multiple servers • I can use them • with various long options. Tuesday, October 25, 11
  • 16. I am a command line wizard • After installing multiple servers • I can use them • with various long options. • Manually. Tuesday, October 25, 11
  • 17. I am a command line wizard • After installing multiple servers • I can use them • with various long options. • Manually. • Do I feel inclined to do so? Tuesday, October 25, 11
  • 18. I am a command line wizard • After installing multiple servers • I can use them • with various long options. • Manually. • Do I feel inclined to do so? • Many dozen times a day? Tuesday, October 25, 11
  • 19. I am a command line wizard • After installing multiple servers • I can use them • with various long options. • Manually. • Do I feel inclined to do so? • Many dozen times a day? • I DEFINITELY DON'T THINK SO. Tuesday, October 25, 11
  • 20. I can set up replication Tuesday, October 25, 11
  • 21. I can set up replication • Almost without errors. Tuesday, October 25, 11
  • 22. I can set up replication • Almost without errors. • And then I can connect to masters and slaves with long options on the command line. Tuesday, October 25, 11
  • 23. I can set up replication • Almost without errors. • And then I can connect to masters and slaves with long options on the command line. • Do I feel inclined to do so? Tuesday, October 25, 11
  • 24. I can set up replication • Almost without errors. • And then I can connect to masters and slaves with long options on the command line. • Do I feel inclined to do so? • I DON'T THINK SO. Tuesday, October 25, 11
  • 25. I have the ability Tuesday, October 25, 11
  • 26. I have the ability • but I don't feel inclined to do repetitive work Tuesday, October 25, 11
  • 27. I have the ability • but I don't feel inclined to do repetitive work • I ADMIT IT: I AM LAZY Tuesday, October 25, 11
  • 28. I have the ability • but I don't feel inclined to do repetitive work • I ADMIT IT: I AM LAZY Tuesday, October 25, 11
  • 29. A lazy developer ® Someone who writes 12,000 lines of code to spare himself the trouble of typing 15 lines on a terminal. Tuesday, October 25, 11
  • 30. A lazy developer ® Someone who writes 12,000 lines of code to spare himself (*) the trouble of typing 15 lines on a terminal. (*) And another 1,000,000 people Tuesday, October 25, 11
  • 32. MySQL Sandbox http://mysqlsandbox.net • Free software (Perl under GPL) • One (unix) host • Many database servers • Single or multiple sandboxes • Customized scripts to use the servers • Standard or circular replication • Installs IN SECONDS Tuesday, October 25, 11
  • 33. overview MySQL MySQL server server Data DB1 Data DB1 DB2 DB3 DATA DIRECTORY DB2 DB3 PORT SOCKET Tuesday, October 25, 11
  • 34. overview MySQL MySQL server server Data DB1 SAME Data DB1 DB2 DB3 DATA DB2 DB3 DIRECTORY? /var/lib/mysql /var/lib/mysql DATA CORRUPTION Tuesday, October 25, 11
  • 35. overview MySQL MySQL server server SAME PORT or SOCKET? 3306 3306 /tmp/mysql.sock /tmp/mysql.sock DOES NOT START Tuesday, October 25, 11
  • 36. The hard way (1) Tuesday, October 25, 11
  • 37. the hard way (2) Tuesday, October 25, 11
  • 38. The easy way $ make_sandbox /path/to/mysql-5.1.54_linux.tar.gz $ make_sandbox Percona-Server-5.1.54_linux.tar.gz # it should work always Tuesday, October 25, 11
  • 39. The easier way $ make_sandbox 5.1.54 # Needs some preliminary work Tuesday, October 25, 11
  • 40. The easiest way $ sb 5.1.54 # Needs the same preliminary work Tuesday, October 25, 11
  • 41. MySQL Sandbox VERSION MySQL server Data DB1 DB2 DB3 $SANDBOX_HOME/msb_VERSION/data VERSION /tmp/mysql_VERSION.sock Tuesday, October 25, 11
  • 42. MySQL Sandbox 5.1.54 MySQL server Data DB1 DB2 DB3 $SANDBOX_HOME/msb_5_1_54/data 5154 /tmp/mysql_5154.sock Tuesday, October 25, 11
  • 43. MySQL Sandbox 5.5.9 MySQL server Data DB1 DB2 DB3 $SANDBOX_HOME/msb_5_5_09/data 5509 /tmp/mysql_5509.sock Tuesday, October 25, 11
  • 44. Single Sandbox MySQL customized scripts server start stop restart status clear send_kill use Tuesday, October 25, 11
  • 45. Multiple Sandbox MySQL customized scripts server start_all stop_all restart_all m n1 status_all s1 n2 clear_all s2 n3 send_kill_a ll use_all Tuesday, October 25, 11
  • 46. Where do you get it •from CPAN sudo cpan MySQL::Sandbox •from launchpad http://launchpad.net/mysql-sandbox Tuesday, October 25, 11
  • 47. The easy replication way $ make_replication_sandbox /path/to/mysql-5.1.54_linux.tar.gz # or, after some preparation $ make_replication_sandbox 5.1.54 Tuesday, October 25, 11
  • 48. default architecture $HOME /sandboxes opt expanded tarballs $SANDBOX_HOME mysql $SANDBOX_BINARY installed sandboxes Tuesday, October 25, 11
  • 49. default architecture $HOME /sandboxes opt msb_5_0_91 mysql msb_5_1_48 5.0.91 rsandbox_5_1_48 5.1.45 master 5.1.48 node1 5.5.4 node2 Tuesday, October 25, 11
  • 51. creating a single sandbox make_sandbox /path/to/mysql-X.X.XX-OS.tar.gz Tuesday, October 25, 11
  • 52. using a single sandbox # after # make_sandbox # /path/to/mysql-X.X.XX-OS.tar.gz $ cd $SANDBOX_HOME/msb_X_X_XX $ ./use Tuesday, October 25, 11
  • 53. creating a single sandbox with a specific options file make_sandbox /path/to/mysql-X.X.XX-OS.tar.gz -- --my_file=/path/to/my.cnf Tuesday, October 25, 11
  • 54. easily create a sandbox after the first one The long way $ cd $HOME/opt/mysql # $SANDBOX_BINARY $ gunzip -c /path/to/mysql-5.1.34-osx10.5-x86.tar.gz | tar -xf - $ mv mysql-5.1.34-osx10.5-x86 5.1.34 $ make sandbox 5.1.34 Tuesday, October 25, 11
  • 55. easily create a sandbox after the first one The short way $ make_sandbox --export_binaries path/to/mysql-5.1.34-osx10.5-x86.tar.gz Tuesday, October 25, 11
  • 56. starting a single sandbox $ cd $SANDBOX_HOME/msb_X_X_XX $ ./start Tuesday, October 25, 11
  • 57. starting a single sandbox with temporary options $ cd $SANDBOX_HOME/msb_X_X_XX $ ./start --option=value $ ./restart --option=value $ ./start --key-buffer=20000000 Tuesday, October 25, 11
  • 58. creating a sandbox with custom port and directory $ make_sandbox 5.1.34 -- --sandbox_port=7800 --sandbox_directory=mickeymouse Tuesday, October 25, 11
  • 59. creating a sandbox with automatic port checking $ make_sandbox 5.1.34 -- --check_port # if 5.1.34 is free # port=5134 # directory=msb_5_1_34 # else # port=5135 (or the first free) # directory=msb_5_1_34_a Tuesday, October 25, 11
  • 60. create a replication sandbox $ make_replication_sandbox path/to/mysql-5.1.34-osx10.5-x86.tar.gz Tuesday, October 25, 11
  • 61. create a circular replication sandbox $ make_replication_sandbox --circular=4 path/to/mysql-5.1.34-osx10.5-x86.tar.gz Tuesday, October 25, 11
  • 62. changing port to an existing sandbox $ sbtool -o port -s /path/to/source/sandbox --new_port=XXXX Tuesday, October 25, 11
  • 63. installing the innodb plugin $ sbtool -o plugin --plugin=innodb -s /path/to/source/sandbox Tuesday, October 25, 11
  • 64. creating a replication sandbox with new base port $ make_replication_sandbox --replication_directory=newwdir --check_base_port 5.0.79 # Creates a replication directory under # $SANDBOX_HOME/newdir # The previous one is preserved. # No conflicts happen Tuesday, October 25, 11
  • 65. more recipes $ perldoc MySQL::Sandbox::Recipes Tuesday, October 25, 11
  • 68. replicator 1 replicator TSB 2 replicator 3 database HOME 1 database sandboxes base_dir 2 database 3 Tuesday, October 25, 11
  • 69. tungsten sandbox help ./tools/tungsten-sandbox -h USAGE: ./tools/tungsten-sandbox [flags] args flags: -n,--nodes: how many nodes to install (default: 3) -m,--mysql_version: which MySQL version to use (default: '5.5.13') -t,--tungsten_base: where to install the sandbox (default: '$HOME/tsb2/') -d,--group_dir: sandbox group directory name (default: 'tr_dbs') -x,--tsb_prefix: Tungsten Sandbox prefix (default: 'db') -s,--service: how the service is named (default: 'tsandbox') -P,--base_port: port base for MySQL sandbox nodes (default: 7100) -l,--thl_port: port for the THL service (default: 12110) -r,--rmi_port: port for the RMI service (default: 10100) -v,--[no]version: show Tungsten sandbox version (default: false) -h,--[no]help: show Tungsten sandbox help (default: false) Tuesday, October 25, 11
  • 70. tungsten sandbox $ ./tools/tungsten-sandbox -m 5.5.10 executing "clear" on node 1 executing "clear" on node 2 executing "clear" on node 3 installing node 1 installing node 2 installing node 3 group directory installed in $HOME/sandboxes/tr_dbs Tuesday, October 25, 11
  • 71. tungsten sandbox ls ~/tsb2 clear_tsandbox db1 db2 db3 db_clear_all db_send_kill_all db_start_all db_status_all db_stop_all db_use_all n1 n2 n3 replicator_all start_tsandbox trepctl_all Tuesday, October 25, 11
  • 74. THANKS Let's talk! This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http:// creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. Tuesday, October 25, 11