28
MySQL Sandbox one (unix) host many database servers single or multiple sandboxes installs IN SECONDS Free software (GPL) http://mysqlsandbox.net Monday, 20 July 2009

MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

  • Upload
    others

  • View
    12

  • Download
    0

Embed Size (px)

Citation preview

Page 1: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

MySQL Sandbox•one (unix) host

•many database servers

•single or multiple sandboxes

•installs IN SECONDS

•Free software (GPL)

http://mysqlsandbox.net

Monday, 20 July 2009

Page 2: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

Monday, 20 July 2009

Page 3: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

Monday, 20 July 2009

Page 4: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

5.1.35

single

Monday, 20 July 2009

Page 5: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

5.1.35

single

5.4.1single

Monday, 20 July 2009

Page 6: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

5.1.35

single

5.4.1single

master

slave slave

5.0.82

standardreplication

5.0.825.0.82

Monday, 20 July 2009

Page 7: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

5.1.35

single

5.4.1single

5.1.35

5.4.15.0.83

group

master

slave slave

5.0.82

standardreplication

5.0.825.0.82

Monday, 20 July 2009

Page 8: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

5.1.35

single

5.4.1single

5.1.34

5.1.34

5.1.345.1.34

circularreplication

5.1.35

5.4.15.0.83

group

master

slave slave

5.0.82

standardreplication

5.0.825.0.82

Monday, 20 July 2009

Page 9: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

1 host - many servers

HOST

5.0.83

single

5.1.35

single

5.4.1single

5.1.34

5.1.34

5.1.345.1.34

circularreplication

5.1.35

5.4.15.0.83

group

master

slave slave

5.0.82

standardreplication

5.0.825.0.82

ALL INDEPENDENT

Monday, 20 July 2009

Page 10: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Installation

•as root

#cpanMySQL::Sandbox

Monday, 20 July 2009

Page 11: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a single sandbox

•as normal user

#make_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

Monday, 20 July 2009

Page 12: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a single sandbox

•as normal user

#make_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

•if you have expanded tarballs already

Monday, 20 July 2009

Page 13: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a single sandbox

•as normal user

#make_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

•if you have expanded tarballs already

#make_sandbox5.1.35

Monday, 20 July 2009

Page 14: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a single sandbox

•as normal user

#make_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

•if you have expanded tarballs already

#make_sandbox5.1.35

< 10 seconds!Monday, 20 July 2009

Page 15: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a replication sandbox

•as normal user

#make_replication_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

Monday, 20 July 2009

Page 16: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a replication sandbox

•as normal user

#make_replication_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

•if you have expanded tarballs already

Monday, 20 July 2009

Page 17: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a replication sandbox

•as normal user

#make_replication_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

•if you have expanded tarballs already

#make_replication_sandbox5.1.35

Monday, 20 July 2009

Page 18: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Creating a replication sandbox

•as normal user

#make_replication_sandbox\

/path/to/mysql‐5.1.35‐YOUROS.gz

•if you have expanded tarballs already

#make_replication_sandbox5.1.35

< 20 seconds!Monday, 20 July 2009

Page 19: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

SHORTCUT - Creating and Using a sandbox

Monday, 20 July 2009

Page 20: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

SHORTCUT - Creating and Using a sandbox

•as normal user (requires version 3.0.04)

Monday, 20 July 2009

Page 21: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

SHORTCUT - Creating and Using a sandbox

•as normal user (requires version 3.0.04)

#sb5.0.83

Monday, 20 July 2009

Page 22: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

SHORTCUT - Creating and Using a sandbox

•as normal user (requires version 3.0.04)

#sb5.0.83

< 5 seconds!Monday, 20 July 2009

Page 23: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

example$make_sandbox5.0.82[...].sandboxserverstartedYoursandboxserverwasinstalledin$SANDBOX_HOME/msb_5_0_82

$$SANDBOX_HOME/msb_5_0_82/use\‐e"selectversion()"+‐‐‐‐‐‐‐‐‐‐‐+|version()|+‐‐‐‐‐‐‐‐‐‐‐+|5.0.82|+‐‐‐‐‐‐‐‐‐‐‐+

Monday, 20 July 2009

Page 24: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

example (shortcut)

$timesb5.0.82‐e"selectversion()"[...].sandboxserverstartedYoursandboxserverwasinstalledin$SANDBOX_HOME/msb_5_0_82+‐‐‐‐‐‐‐‐‐‐‐+|version()|+‐‐‐‐‐‐‐‐‐‐‐+|5.0.82|+‐‐‐‐‐‐‐‐‐‐‐+

real 0m2.041suser 0m0.290ssys0m0.210s

Monday, 20 July 2009

Page 25: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

example replication $make_replication_sandbox5.0.82[...]replicationdirectoryinstalledon$SANDBOX_HOME/rsandbox_5_0_82

$$SANDBOX_HOME/rsandbox_5_8_82/m\‐e"selectversion()"

+‐‐‐‐‐‐‐‐‐‐‐+|version()|+‐‐‐‐‐‐‐‐‐‐‐+|5.0.82|+‐‐‐‐‐‐‐‐‐‐‐+

Monday, 20 July 2009

Page 26: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

example replication(shortcut)

$timesbr5.0.82‐e"selectversion()"[...]replicationdirectoryinstalledin$HOME/rsandbox_5_0_82+‐‐‐‐‐‐‐‐‐‐‐‐+|version()|+‐‐‐‐‐‐‐‐‐‐‐‐+|5.0.82‐log|+‐‐‐‐‐‐‐‐‐‐‐‐+

real 0m4.682suser 0m0.795ssys0m0.585s

Monday, 20 July 2009

Page 27: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

more control with replication

$cd$SANDBOX_HOME/rsandbox_5_8_82$./use_all"SELECT@@server_id"#master@@server_id1#server:1:@@server_id101#server:2:@@server_id102

Monday, 20 July 2009

Page 28: MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \ /path/to/mysql‐5.1.35‐YOUROS.gz •if you have expanded tarballs already # make_replication_sandbox

Self contained•All sandboxes are created inside

$SANDBOX_HOME

•Use all at once

•Great control

http://mysqlsandbox.netMonday, 20 July 2009