SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Reliable MySQL Using Replication Issac Goldstand Mirimar Networks www.mirimar.net [email_address]
What is replication? ,[object Object],[object Object],[object Object],[object Object]
Replication basics… ,[object Object],[object Object],[object Object],Master Slave Slave Slave Slaves
Replication basics… ,[object Object],[object Object],[object Object],DATA DATA INSERT INTO … Master Slave Client
Replication basics… ,[object Object],[object Object],DATA DATA INSERT INTO … Binary Log Master Slave Client
Replication basics… ,[object Object],[object Object],[object Object],DATA DATA INSERT INTO … INSERT INTO … Relay Log Replication Thread Master Slave Client
Replication basics… ,[object Object],[object Object],DATA DATA INSERT INTO … INSERT INTO … Relay Log Replication Thread DATA Master Slave Client
Replication Strategies ,[object Object],Master Slave Slave Slave Client (SELECT) Client (SELECT) Client (SELECT) Client (SELECT) Client (SELECT) Client (SELECT) Client (INSERT)
Replication Strategies ,[object Object],[object Object],MySQL Server MySQL Server MySQL Server Client INSERT INTO… INSERT INTO … Client
Replication Strategies ,[object Object],[object Object],[object Object],DATA DATA DATA DATA DATA Client Master Slave
Replication Strategies ,[object Object],[object Object],[object Object],[object Object],Master Slave Backup with LOCK TABLES (or single transaction) Client INSERT / SELECT Client INSERT / SELECT
Simple Replication Setup ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Configure master my.cnf ------------- [mysqld] server-id = 1 log-bin
Configure slave my.cnf ------------- [mysqld] server-id = 2 master-user = someuser master-password = secret master-host = ip.of.master
Initial dataset ,[object Object],[object Object],[object Object],[object Object]
Configure log position MASTER mysql> SHOW MASTER STATUS; +---------------------------+----------+--------------+------------------+ | File  | Position | Binlog_Do_DB | Binlog_Ignore_DB | +---------------------------+----------+--------------+------------------+ |  vmware-mirimar-bin.000002  |  79  |  |  | +---------------------------+----------+--------------+------------------+ SLAVE mysql> CHANGE MASTER TO MASTER_LOG_FILE=‘ vmware-mirimar-bin.000002 ’, MASTER_LOG_POS= 79 ; SLAVE mysql> START SLAVE;
Using CHANGE MASTER TO ,[object Object],[object Object],[object Object],[object Object],[object Object]
Advanced CHANGE MASTER TO ,[object Object],[object Object],[object Object],[object Object],[object Object]
Confirming it works SLAVE mysql> SHOW SLAVE STATUS *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host:  vmware-mirimar Master_User:  someuser Master_Port: 3306 Connect_Retry: 60 Master_Log_File:  vmware-mirimar-bin.000002 Read_Master_Log_Pos:  79 Relay_Log_File: vmware1-mirimar-relay-bin.000002 Relay_Log_Pos: 250 Relay_Master_Log_File: vmware-mirimar-bin.000002 Slave_IO_Running:  Yes Slave_SQL_Running:  Yes Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 79 Relay_Log_Space: 250 Seconds_Behind_Master:  0
Permissions ,[object Object],[object Object]
Internal Threads ,[object Object],[object Object],[object Object]
IO thread isolation ,[object Object],[object Object]
SQL thread isolation ,[object Object],[object Object],[object Object]
Master Thread ,[object Object],[object Object],[object Object]
Status files ,[object Object],[object Object],[object Object],[object Object]
Information in master.info ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Information in relay-log.info ,[object Object],[object Object],[object Object],[object Object]
Backup master ,[object Object],[object Object],[object Object],[object Object]
Backup master files ,[object Object],[object Object],[object Object],[object Object]
Backup slave ,[object Object],[object Object],[object Object]
Live demo ,[object Object]
For more information ,[object Object],[object Object],[object Object]
Thank You! For more information: Issac Goldstand margol@mirimar.net http://www.beamartyr.net/ http://www.mirimar.net/

Weitere ähnliche Inhalte

Was ist angesagt?

Soft Skill Training
Soft Skill TrainingSoft Skill Training
Soft Skill TrainingTime Rahul
 
Medical Store Management System Software Engineering Project
Medical Store Management System Software Engineering ProjectMedical Store Management System Software Engineering Project
Medical Store Management System Software Engineering Projecthani2253
 
Transaction processing systems
Transaction processing systemsTransaction processing systems
Transaction processing systemsmakeitsimple007
 
Hospital Management System.pptx
Hospital Management System.pptxHospital Management System.pptx
Hospital Management System.pptxLakshayPanchal
 
Facial expressions pp
Facial expressions ppFacial expressions pp
Facial expressions ppKeriC325
 
Classification of Computer
Classification of ComputerClassification of Computer
Classification of ComputerAasim Mushtaq
 
Sample test questions
Sample test questionsSample test questions
Sample test questionsguest7ba970e
 
Basic Parts of Computer
Basic Parts of ComputerBasic Parts of Computer
Basic Parts of ComputerDex Wasin
 
Master of Ceremony Script
Master of Ceremony ScriptMaster of Ceremony Script
Master of Ceremony ScriptBella Meraki
 
Management information System in ecommerce company
Management information System in ecommerce companyManagement information System in ecommerce company
Management information System in ecommerce companyKartik Maniktala
 
Letter To Dean
Letter To DeanLetter To Dean
Letter To Deanjayabalos
 
Chapter 2-Realated literature and Studies
Chapter 2-Realated literature and StudiesChapter 2-Realated literature and Studies
Chapter 2-Realated literature and StudiesMercy Daracan
 

Was ist angesagt? (20)

memory unit
memory unitmemory unit
memory unit
 
Soft Skill Training
Soft Skill TrainingSoft Skill Training
Soft Skill Training
 
Communication Skills
Communication SkillsCommunication Skills
Communication Skills
 
Flash drive
Flash driveFlash drive
Flash drive
 
Information system
Information systemInformation system
Information system
 
Medical Store Management System Software Engineering Project
Medical Store Management System Software Engineering ProjectMedical Store Management System Software Engineering Project
Medical Store Management System Software Engineering Project
 
Internal hardware
Internal hardwareInternal hardware
Internal hardware
 
Transaction processing systems
Transaction processing systemsTransaction processing systems
Transaction processing systems
 
Why do people love to dance
Why do people love to danceWhy do people love to dance
Why do people love to dance
 
Hospital Management System.pptx
Hospital Management System.pptxHospital Management System.pptx
Hospital Management System.pptx
 
Facial expressions pp
Facial expressions ppFacial expressions pp
Facial expressions pp
 
Classification of Computer
Classification of ComputerClassification of Computer
Classification of Computer
 
Sample test questions
Sample test questionsSample test questions
Sample test questions
 
Basic Parts of Computer
Basic Parts of ComputerBasic Parts of Computer
Basic Parts of Computer
 
Master of Ceremony Script
Master of Ceremony ScriptMaster of Ceremony Script
Master of Ceremony Script
 
Management information System in ecommerce company
Management information System in ecommerce companyManagement information System in ecommerce company
Management information System in ecommerce company
 
Letter To Dean
Letter To DeanLetter To Dean
Letter To Dean
 
Chapter 2-Realated literature and Studies
Chapter 2-Realated literature and StudiesChapter 2-Realated literature and Studies
Chapter 2-Realated literature and Studies
 
Computer specifications
Computer specificationsComputer specifications
Computer specifications
 
Acknowledgment
AcknowledgmentAcknowledgment
Acknowledgment
 

Andere mochten auch

What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...Edureka!
 
Lengua y literatura tercero
Lengua y literatura terceroLengua y literatura tercero
Lengua y literatura terceroAlfredo Vera
 
Presentation deduplication backup software and system
Presentation   deduplication backup software and systemPresentation   deduplication backup software and system
Presentation deduplication backup software and systemxKinAnx
 
Market Research Report : Power backup market in india 2013
Market Research Report : Power backup market in india 2013Market Research Report : Power backup market in india 2013
Market Research Report : Power backup market in india 2013Netscribes, Inc.
 
Windows 10 deployment training for system builders
Windows 10 deployment training for system buildersWindows 10 deployment training for system builders
Windows 10 deployment training for system buildersnorthernlightz
 
Lesson 5 ms office word 2007
Lesson 5   ms office word 2007Lesson 5   ms office word 2007
Lesson 5 ms office word 2007Ahaly
 
Windows 10 VDI Migration in real life - E2EVC Rome
Windows 10 VDI Migration in real life - E2EVC RomeWindows 10 VDI Migration in real life - E2EVC Rome
Windows 10 VDI Migration in real life - E2EVC RomeSacha Thomet
 
Windows 8 vs windows 7 ppt
Windows 8 vs windows 7 pptWindows 8 vs windows 7 ppt
Windows 8 vs windows 7 pptDiya Mirza
 
Comparison of Windows 7 & Windows 8
Comparison of Windows 7 & Windows 8Comparison of Windows 7 & Windows 8
Comparison of Windows 7 & Windows 8Vibhanshu Chaturvedi
 
Presentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyyPresentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyyTehmina Gulfam
 
Thalassemia dr.k.v.giridhar
Thalassemia dr.k.v.giridharThalassemia dr.k.v.giridhar
Thalassemia dr.k.v.giridhargiridharkv
 
Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...
Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...
Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...Dhananjay Dhiman
 
01 microsoft office word 2007 (introduction and parts)
01 microsoft office word 2007 (introduction and parts)01 microsoft office word 2007 (introduction and parts)
01 microsoft office word 2007 (introduction and parts)benchhood
 

Andere mochten auch (20)

What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
What is Artificial Intelligence | Artificial Intelligence Tutorial For Beginn...
 
Lengua y literatura tercero
Lengua y literatura terceroLengua y literatura tercero
Lengua y literatura tercero
 
Endapan Placer
Endapan PlacerEndapan Placer
Endapan Placer
 
Presentation deduplication backup software and system
Presentation   deduplication backup software and systemPresentation   deduplication backup software and system
Presentation deduplication backup software and system
 
Market Research Report : Power backup market in india 2013
Market Research Report : Power backup market in india 2013Market Research Report : Power backup market in india 2013
Market Research Report : Power backup market in india 2013
 
Windows 10 deployment training for system builders
Windows 10 deployment training for system buildersWindows 10 deployment training for system builders
Windows 10 deployment training for system builders
 
Lesson 5 ms office word 2007
Lesson 5   ms office word 2007Lesson 5   ms office word 2007
Lesson 5 ms office word 2007
 
Windows 10 VDI Migration in real life - E2EVC Rome
Windows 10 VDI Migration in real life - E2EVC RomeWindows 10 VDI Migration in real life - E2EVC Rome
Windows 10 VDI Migration in real life - E2EVC Rome
 
Windows 8 vs windows 7 ppt
Windows 8 vs windows 7 pptWindows 8 vs windows 7 ppt
Windows 8 vs windows 7 ppt
 
Comparison of Windows 7 & Windows 8
Comparison of Windows 7 & Windows 8Comparison of Windows 7 & Windows 8
Comparison of Windows 7 & Windows 8
 
Presentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyyPresentation on backup and recoveryyyyyyyyyyyyy
Presentation on backup and recoveryyyyyyyyyyyyy
 
Thalassemia dr.k.v.giridhar
Thalassemia dr.k.v.giridharThalassemia dr.k.v.giridhar
Thalassemia dr.k.v.giridhar
 
Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...
Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...
Chemistry Investigatory Project Class 12 - Green Chemistry - Bio Diesel And B...
 
Thalassemia
ThalassemiaThalassemia
Thalassemia
 
thalassemia
thalassemiathalassemia
thalassemia
 
Introduction to microsoft word 2007
Introduction to microsoft word 2007Introduction to microsoft word 2007
Introduction to microsoft word 2007
 
01 microsoft office word 2007 (introduction and parts)
01 microsoft office word 2007 (introduction and parts)01 microsoft office word 2007 (introduction and parts)
01 microsoft office word 2007 (introduction and parts)
 
Windows 10
Windows 10Windows 10
Windows 10
 
Thalassemia
ThalassemiaThalassemia
Thalassemia
 
Chemistry Investigatory Project (Class 12 ,CBSE)
Chemistry Investigatory Project (Class 12 ,CBSE)  Chemistry Investigatory Project (Class 12 ,CBSE)
Chemistry Investigatory Project (Class 12 ,CBSE)
 

Ähnlich wie Download presentation

Mysql replication @ gnugroup
Mysql replication @ gnugroupMysql replication @ gnugroup
Mysql replication @ gnugroupJayant Chutke
 
Download presentation
Download presentationDownload presentation
Download presentationRachit Gaur
 
Download presentation531
Download presentation531Download presentation531
Download presentation531Indra Pratap
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016Dave Stokes
 
MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016Dave Stokes
 
Mater,slave on mysql
Mater,slave on mysqlMater,slave on mysql
Mater,slave on mysqlVasudeva Rao
 
ConFoo MySQL Replication Evolution : From Simple to Group Replication
ConFoo  MySQL Replication Evolution : From Simple to Group ReplicationConFoo  MySQL Replication Evolution : From Simple to Group Replication
ConFoo MySQL Replication Evolution : From Simple to Group ReplicationDave Stokes
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017Dave Stokes
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016Dave Stokes
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMakerKris Buytaert
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017Dave Stokes
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replicationPoguttuezhiniVP
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replicationsqlhjalp
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloudTahsin Hasan
 
2012 replication
2012 replication2012 replication
2012 replicationsqlhjalp
 
Performence tuning
Performence tuningPerformence tuning
Performence tuningVasudeva Rao
 
Replication tutorial presentation
Replication tutorial presentationReplication tutorial presentation
Replication tutorial presentationcolderboy17
 

Ähnlich wie Download presentation (20)

Mysql replication @ gnugroup
Mysql replication @ gnugroupMysql replication @ gnugroup
Mysql replication @ gnugroup
 
Download presentation
Download presentationDownload presentation
Download presentation
 
Download presentation531
Download presentation531Download presentation531
Download presentation531
 
Mysql
MysqlMysql
Mysql
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016
 
MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016MySQL Replication Basics -Ohio Linux Fest 2016
MySQL Replication Basics -Ohio Linux Fest 2016
 
Mater,slave on mysql
Mater,slave on mysqlMater,slave on mysql
Mater,slave on mysql
 
ConFoo MySQL Replication Evolution : From Simple to Group Replication
ConFoo  MySQL Replication Evolution : From Simple to Group ReplicationConFoo  MySQL Replication Evolution : From Simple to Group Replication
ConFoo MySQL Replication Evolution : From Simple to Group Replication
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
 
MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016MySQL Replication Update -- Zendcon 2016
MySQL Replication Update -- Zendcon 2016
 
MySQL HA with PaceMaker
MySQL HA with  PaceMakerMySQL HA with  PaceMaker
MySQL HA with PaceMaker
 
MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017MySQL Replication Evolution -- Confoo Montreal 2017
MySQL Replication Evolution -- Confoo Montreal 2017
 
MySQL database replication
MySQL database replicationMySQL database replication
MySQL database replication
 
8.replication
8.replication8.replication
8.replication
 
2012 scale replication
2012 scale replication2012 scale replication
2012 scale replication
 
Mysql S&M
Mysql S&MMysql S&M
Mysql S&M
 
Architecting cloud
Architecting cloudArchitecting cloud
Architecting cloud
 
2012 replication
2012 replication2012 replication
2012 replication
 
Performence tuning
Performence tuningPerformence tuning
Performence tuning
 
Replication tutorial presentation
Replication tutorial presentationReplication tutorial presentation
Replication tutorial presentation
 

Mehr von webhostingguy

Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Frameworkwebhostingguy
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guidewebhostingguy
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3webhostingguy
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serverswebhostingguy
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidationwebhostingguy
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreementwebhostingguy
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...webhostingguy
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...webhostingguy
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructurewebhostingguy
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.pptwebhostingguy
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy webhostingguy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandiserswebhostingguy
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Productswebhostingguy
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mbwebhostingguy
 

Mehr von webhostingguy (20)

File Upload
File UploadFile Upload
File Upload
 
Running and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test FrameworkRunning and Developing Tests with the Apache::Test Framework
Running and Developing Tests with the Apache::Test Framework
 
MySQL and memcached Guide
MySQL and memcached GuideMySQL and memcached Guide
MySQL and memcached Guide
 
Novell® iChain® 2.3
Novell® iChain® 2.3Novell® iChain® 2.3
Novell® iChain® 2.3
 
Load-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web serversLoad-balancing web servers Load-balancing web servers
Load-balancing web servers Load-balancing web servers
 
SQL Server 2008 Consolidation
SQL Server 2008 ConsolidationSQL Server 2008 Consolidation
SQL Server 2008 Consolidation
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
What is mod_perl?
What is mod_perl?What is mod_perl?
What is mod_perl?
 
Master Service Agreement
Master Service AgreementMaster Service Agreement
Master Service Agreement
 
Notes8
Notes8Notes8
Notes8
 
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...PHP and MySQL PHP Written as a set of CGI binaries in C in ...
PHP and MySQL PHP Written as a set of CGI binaries in C in ...
 
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...Dell Reference Architecture Guide Deploying Microsoft® SQL ...
Dell Reference Architecture Guide Deploying Microsoft® SQL ...
 
Managing Diverse IT Infrastructure
Managing Diverse IT InfrastructureManaging Diverse IT Infrastructure
Managing Diverse IT Infrastructure
 
Web design for business.ppt
Web design for business.pptWeb design for business.ppt
Web design for business.ppt
 
IT Power Management Strategy
IT Power Management Strategy IT Power Management Strategy
IT Power Management Strategy
 
Excel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for MerchandisersExcel and SQL Quick Tricks for Merchandisers
Excel and SQL Quick Tricks for Merchandisers
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
Parallels Hosting Products
Parallels Hosting ProductsParallels Hosting Products
Parallels Hosting Products
 
Microsoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 MbMicrosoft PowerPoint presentation 2.175 Mb
Microsoft PowerPoint presentation 2.175 Mb
 
Reseller's Guide
Reseller's GuideReseller's Guide
Reseller's Guide
 

Download presentation

  • 1. Reliable MySQL Using Replication Issac Goldstand Mirimar Networks www.mirimar.net [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13. Configure master my.cnf ------------- [mysqld] server-id = 1 log-bin
  • 14. Configure slave my.cnf ------------- [mysqld] server-id = 2 master-user = someuser master-password = secret master-host = ip.of.master
  • 15.
  • 16. Configure log position MASTER mysql> SHOW MASTER STATUS; +---------------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +---------------------------+----------+--------------+------------------+ | vmware-mirimar-bin.000002 | 79 | | | +---------------------------+----------+--------------+------------------+ SLAVE mysql> CHANGE MASTER TO MASTER_LOG_FILE=‘ vmware-mirimar-bin.000002 ’, MASTER_LOG_POS= 79 ; SLAVE mysql> START SLAVE;
  • 17.
  • 18.
  • 19. Confirming it works SLAVE mysql> SHOW SLAVE STATUS *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: vmware-mirimar Master_User: someuser Master_Port: 3306 Connect_Retry: 60 Master_Log_File: vmware-mirimar-bin.000002 Read_Master_Log_Pos: 79 Relay_Log_File: vmware1-mirimar-relay-bin.000002 Relay_Log_Pos: 250 Relay_Master_Log_File: vmware-mirimar-bin.000002 Slave_IO_Running: Yes Slave_SQL_Running: Yes Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 79 Relay_Log_Space: 250 Seconds_Behind_Master: 0
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33. Thank You! For more information: Issac Goldstand margol@mirimar.net http://www.beamartyr.net/ http://www.mirimar.net/