From 5d62f5d177896268afe34c473d1980ce5aedfdde Mon Sep 17 00:00:00 2001 From: emorino Date: Thu, 11 Jun 2020 14:47:56 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9inject=C3=A9=20un=20dump=20dans=20=C3=A9?= =?UTF-8?q?crire=20dans=20les=20binlogs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HowtoMySQL/Replication.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/HowtoMySQL/Replication.md b/HowtoMySQL/Replication.md index 11b81a27..fdb17803 100644 --- a/HowtoMySQL/Replication.md +++ b/HowtoMySQL/Replication.md @@ -79,6 +79,19 @@ Pour éviter que la réplication démarre automatiquement au démarrage, on ajou skip-slave-start ~~~ +## Réinjecté un dump dans écrire dans les binlogs + +Si l'on veux injecté un dump dans une base mysql, ou une instance complète, sans écrire dans les binlogs, on peut utilisé l'option --unit-command qui initialise une requêtes msyql avant chaque requête du dump : + +~~~ +# mysql --init-command="SET SQL_LOG_BIN = 0;" -o mabase < mabase.sql +~~~ + +Si dump compréssé : + +~~~ +# zcat mabase.sql.gz | mysql --init-command="SET SQL_LOG_BIN = 0;" +~~~ ## Configuration avancée