MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \...
Transcript of MySQL Sandbox · Creating a replication sandbox •as normal user # make_replication_sandbox \...
![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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/1.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/3.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/4.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/5.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/9.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/10.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/11.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/12.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/13.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/14.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/15.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/16.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/17.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/18.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/19.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/20.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/21.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/22.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/23.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/24.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/25.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/26.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/27.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022050418/5f8dea775007972977291527/html5/thumbnails/28.jpg)
Self contained•All sandboxes are created inside
$SANDBOX_HOME
•Use all at once
•Great control
http://mysqlsandbox.netMonday, 20 July 2009