Re-sync slave without lock master
Hi, I've a simple Mysql Replication environment.
Master configuration (ver. 5.7.21):
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
bind-address = 192.168.97.54
symbolic-links=0
server-id = 1
log_bin = /var/lib/mysql/mysql-bin.log
relay_log = /var/lib/mysql/mysql-relay-bin
expire_logs_days = 4
binlog-format = mixed
max_allowed_packet = 16M
ignore-db-dir=lost+found
innodb_buffer_pool_size = 2048M
innodb_log_file_size = 32M
max_connections = 500
sql-mode = ""
Salve configuration (ver. 5.7.21):
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
log-error = /var/log/mysql/error.log
bind-address = 192.168.97.56
symbolic-links=0
server-id = 2
log_bin = /var/lib/mysql/mysql-bin.log
relay_log = /var/lib/mysql/mysql-relay-bin
expire_logs_days = 4
binlog-format = mixed
log-slave-updates = 1
skip-slave-start
max_allowed_packet = 16M
ignore-db-dir=lost+found
innodb_buffer_pool_size = 3072M
innodb_log_file_size = 32M
max_connections = 500
sql-mode = ""
I need to re-sync the slave, so, on the master I run:
mysqldump -p --skip-lock-tables --single-transaction --flush-logs --hex-blob --replace --master-data -A > /tmp/dump.sql
Then dump process takes 25 minutes.
After, on the slave, I import the dump and START SLAVE but I get, every time, the slave error 1062 so every time the replication is broken.
I try to skip the error, but I got severals same error.
how to re-synch master and slave without lock tables?
Thanks a lot
Stefano
Subject
Views
Written By
Posted
Re-sync slave without lock master
1583
July 06, 2018 02:41AM
710
July 14, 2018 01:51PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.