User Tools
Writing /app/www/public/data/meta/watchdogs/mysqlslavereplicationfailure.meta failed
watchdogs:mysqlslavereplicationfailure
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| watchdogs:mysqlslavereplicationfailure [2018/09/21 10:36] – ywang | watchdogs:mysqlslavereplicationfailure [2021/06/25 10:09] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | **mysqlSlaveReplicationFailure** | ||
| + | //Author: Yanjun Wang// | ||
| + | |||
| + | - **Step to Resolve Query Running Timeout Issue** | ||
| + | |||
| + | * login into slave database | ||
| + | * run the following commands and copy the result which will be used for further investigation | ||
| + | < | ||
| + | show slave status\G | ||
| + | show processlist; | ||
| + | show engine innodb status\G | ||
| + | show open tables where In_Use > 0; | ||
| + | </ | ||
| + | **START to solve the issue** | ||
| + | * run show slave status\G | ||
| + | * check the Last_Errno and Last_Error to identify if it's a timeout issue, and also copy the query for running later. | ||
| + | * run the command to skip that query(will be run manually later) and restart slave | ||
| + | < | ||
| + | SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; | ||
| + | START SLAVE; | ||
| + | </ | ||
| + | * run the query you copied manually to keep the slave up-to-date | ||
| + | **END to solve the issue** | ||
| + | * if Last_Error doesn' | ||
| + | < | ||
| + | pt-table-sync -u<user have writer permission> | ||
| + | e.g. pt-table-sync -uwriter --print --sync-to-master 10.230.10.15 --tables snmp_manager.network_element --ask-pass > ne.sql | ||
| + | </ | ||
| + | * run the query you get from file_to_store_query.sql, | ||