mysql> SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
mysql> start slave;
Showing posts with label mysql replication recovery. Show all posts
Showing posts with label mysql replication recovery. Show all posts
Tuesday, July 31, 2012
mysql: recover from sql replication error
if you encounter a replication error caused by one sql command, you can skip that error and continue your replication by running the following commands on your slave:
Thursday, December 08, 2011
mysql: recover from replication error
to recover from replication error... do the ff:
* if you can stop master for a few mins
1. stop current replication db
(on slave db)
2. stop master mysql
(on master db)
3. get a snapshot of master db
(on master db)
4. start master db
5. copy snapshot of master db to slave db
6. start slave and replication
** if you cant stop master for a few mins
1. stop current replication db
(on slave db)
2. reset master mysql
(on master db)
3. get a snapshot of master db
(on master db)
4. copy snapshot of master db to slave db
5. start slave and replication
*** if you just want recover replication without stopping mysql (and without copying missing entries)
1. stop current replication db
(on slave db)
2. reset master mysql
(on master db)
3. start slave and replication
* if you can stop master for a few mins
1. stop current replication db
(on slave db)
# show slave status;
# stop slave;
# reset slave;
> /etc/init.d/mysql stop2. stop master mysql
(on master db)
# show master status;
# reset master;
> /etc/init.d/mysql stop3. get a snapshot of master db
(on master db)
> copy -r /data/mysqldata /home/backup/mysqldataMaster4. start master db
> /etc/init.d/mysql start
# show master status;5. copy snapshot of master db to slave db
> scp ...
> cp ...6. start slave and replication
> /etc/init.d/mysql start
# start slave;
# show slave status;** if you cant stop master for a few mins
1. stop current replication db
(on slave db)
# show slave status;
# stop slave;
# reset slave;
> /etc/init.d/mysql stop2. reset master mysql
(on master db)
# show master status;
# reset master;3. get a snapshot of master db
(on master db)
> copy -r /data/mysqldata /home/backup/mysqldataMaster4. copy snapshot of master db to slave db
> scp ...
> cp ...5. start slave and replication
> /etc/init.d/mysql start
# start slave;
# show slave status;*** if you just want recover replication without stopping mysql (and without copying missing entries)
1. stop current replication db
(on slave db)
# show slave status;
# stop slave;
# reset slave;2. reset master mysql
(on master db)
# show master status;
# reset master;3. start slave and replication
# start slave;
# show slave status;
Subscribe to:
Posts (Atom)
SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss
Got this while connecting to my mikrotik router via ssh Unable to negotiate with <ip address> port <ssh port>: no matching hos...
-
got 554 5.7.1 ACL dns_rbl; Client host [121.58.237.210] blocked using > sa-ip4tset.blagr.emailsrvr.com=127.26.0.2 http://blaggregat...
-
got: Warning: dl() [function.dl]: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_mapscript...
-
getting NOQUEUE: reject: RCPT from unknown[x.x.x.x]: 554 5.7.1 : Relay access denied ? in your zimbra admin go to: server > mta >...