Detect, prepare and restore a tilt Mysql replication
en:Detect, prepare and restore a tilt Mysql replication
he:לזהות, להכין ולשחזר הטיה של Mysql שכפול
ro:Detectarea, pregăti şi restaura o înclinare Mysql replication
ru:Обнаружение, подготовка и восстановление наклона репликации Mysql
pl:Wykrywanie, przygotować i przywrócić tilt replikacji Mysql
ja:検出し、準備し、チルト Mysql レプリケーションを復元
ar:كشف، وإعداد واستعادة إمالة النسخ المتماثل الخلية
zh:检测、 准备和还原倾斜 Mysql 复制
de:Erkennen, vorzubereiten und eine Neigung Mysql Replikation wiederherstellen
nl:Detecteren, het voorbereiden en het herstel van een tilt Mysql replicatie
it:Rilevare, preparare e ripristinare un tilt replica di Mysql
pt:Detectar, preparar e restaurar uma inclinação replicação do Mysql
es:Detectar, preparar y restaurar una inclinación replicación Mysql
fr:Détecter, préparer et rétablir une réplication Mysql basculée
This article has been created by an automatic translation software. You can view the article source here.
Under Debian | _. _. You have implemented a system of replication of your Mysql database through a configuration | _. _. Prepare | _. _. Before you perform the commands that follow, plan the operation | _. _. Prefer a time slot or the solicitation of databases is a its minimum.. When a problem is on the | _. _. , it's the | _. _. slave | _. _. slave | _. _. who takes over. However it should be first noted that this rocker occurred.8
Detection | _. _. Depending on your level of, you may have a monitoring of the functioning of replication, you are warned by rocker support./If you toggle the Server master to the | _. _. Slavic, the ip of the latter will be automatically changed to respond instead of the | _. _. Master | _. _. The volume of the Slavic will be more important and will contain the latest recorded information. Server By order on the BDD | _. _. Connect you has the BDD | _. _. MySQL | _. _. | _. _. On | _. _. Refresh the _LO', MASTER_LO_POS | _. _. _FILE and MASTER_LO_POS clauses by the previous order information. | _. _. Then check the of the | _. _. Master | _. _. | _. _. G (slave) Make sure your BDD is not modified by also putting your site in maintenance | _. _. Should absolutely not be writing on the BDD SLAVE time of intervention: _! _ | In the case of writing during the procedure, here are the consequences: _! _ | Replicat unsynchronized | _. _. Data may be lost or corrupted | _. _. Prevent writing | _. _. To prevent writing to a BDD, implement | _. _. read-only | _. _. . Which will have the effect of blocking on the BDD write requests.
- | _. _. | _. _. | _. _. | _. _. Server | _. _. IP or Hostname machine SLAVE | _. _. Server | _. _. IP or Hostname machine MASTER | _. _. Path | _. _. : _. _. Path | _. _. File: _. _. SCP | _. _. Server | _. _. Path | _. _. File: _. _. Login | _. _. Server | _. _. Path | _. _. File: _. _. Import the dump | _. _. Then import it into the Master database in order to synchronize the | _. _. BDD.
- On MASTER | _. _. MySQL | _. _. | _. _. | _. _. Restore replication | _. _. On the | _. _. MASTER | _. _. You need information from the | _. _. master, so run the command | _. _. | _. _. | _. _. G Server MySQL | _. _. | _. _. | _. _. Keep these two sidelines | _. _. Leader: _! _ | MySQL-bin. Server Server master
-
- _! _ | :
- -
MASTER_LOG_FILE being leader | _. _. MASTER_LOG_POS being Position | _. _. slave stop | _. _. | _. _. MySQL-bin. Server master:
show master status\G
==
! X
slave start | _. _. Test and finalization | _. _. To verify the implementation of this replication use on the SLAVE | _. _. | _. _. | _. _. G
> Remove the read-only on your bdd restriction | _. _. SLAVE | _. _. | _. _. | _. _. | _. _. You can restart all your services using the Bdd. | :
- Check their performance through the following command substituting | _. _. | _. _. by those concerned.
- example: _! _ | your | _. _. Web | _. _. Apache | _. _. your DBMS Mysql | _. _. MySQL | _. _. | _. _. status: _! _ | | _. _. .service | _. _. This documentation was created from internal documentation and the official Mysql documentation
==
(read-only)
'
FLUSH TABLES WITH READ LOCK; SET GLOBAL read_only = ;
==
'
-- --single-transaction -u votre_utilisateur -p votre_mot_de_passe --all-databases --= > /destination/de/depart/mon/backup.sql
/destination/de/mon/backup.sql backup backup :)
==
Server
- login1 : login ssh machine SLAVE
- login2 : login ssh machine MASTER
- Serveur1 :
- Serveur2 :
- / 1 : /destination/de/depart/de/mon/backup.sql
- / 2 : /destination/darrivee/de/mon/backup.sql
1@Serveur1:/1 Login2@Serveur2:/2
==
2 BDD.
'
-u votre_utilisateur -p votre_mot_de_passe < /destination/de/mon/backup.sql
==
Server MASTER: Server :
echo "show master status\G" | -u votre_utilisateur -p votre_mot_de_passe
:
- File: 1X1X1X
- Position: 2X2X2X2X2
'
; CHANGE MASTER TO MASTER_LOG_FILE='1X1X1=2X2X2X2X2;;
==
echo "show slave status\G" | -u votre_utilisateur -p votre_mot_de_passe
:
- 0
SLAVE: SET GLOBAL read_only = OFF;UNLOCK TABLES;
"votreservice"
votre Server : "apache2"
: "mysql"
systemctl status "votreservice".service
'
Enable comment auto-refresher