Answer the question
In order to leave comments, you need to log in
What causes persistent mysql replication errors 1032 and 1062?
Good afternoon.
Understanding mysql replication. Raised master(+2 slave) - master(+1 slave) replication.
Did everything as instructed.
- Locked tables on the master for writing
- Made a backup and sent it to the slave
- Stopped the slave on the slave - Expanded the
backup and set the details of the master status.
Enabled read-only on slaves.
Everything is working.
After some short time, either the 1032nd or the 1062nd error crashes on any node.
Error Code: 1062 - Duplicate entry 'ххххх' for key 1 - Attempt to write an already existing value to the key column.
Error: 1032 SQLSTATE: HY000 (ER_KEY_NOT_FOUND) - Message: Cannot find entry in '%s'
The project was raised on a demo version of Bitrix and virtualbox nodes.
Errors occur in actively used tables - statistics (fixing hits, etc., etc.) and sessions, most often sessions.
Master configs
[mysqld]
server-id = 1
## enable logging message
log-error = /var/log/mysql/error.log
## enable slow requests logging
slow-query-log-file = /var/log/mysql/slow.log
slow-query-log = 1
long-query-time = 3
log-slow-slave-statements
## define binlog options for master server
binlog_cache_size = 128K
expire_logs_days = 5
max_binlog_size = 100M
binlog-format = mixed
log-bin = mysql-bin
## enable this options for security, but it decrease performance
# innodb_flush_log_at_trx_commit = 1
# sync_binlog = 1
relay-log = relay-bin
relay-log-index = relay-bin.index
relay-log-info-file = relay-bin.info
skip-name-resolve
Slave configs[mysqld]
server-id = 2
## enable logging message
log-error = /var/log/mysql/error.log
## enable slow requests logging
slow-query-log-file = /var/log/mysql/slow.log
slow-query-log = 1
long-query-time = 3
log-slow-slave-statements
relay-log = relay-bin
relay-log-index = relay-bin.index
relay-log-info-file = relay-bin.info
skip-name-resolve
Answer the question
In order to leave comments, you need to log in
Good afternoon!
1. indicate the version of the muscle
2. indicate the method and parameters when removing the dump
3. what rights do you give, and how do you launch it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question