sql_slave_skip_counter跳過太多的反應
sql_slave_skip_counter跳過太多的反應
一套主從環境,
在主上操作的ddl,dml操作,不能同步到從庫上,看主從狀態卻也是正常的:
主:
mysql> show master status ;
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000147 | 1207 | | | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
從:
mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.4.19.47
Master_User: sla
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000147
Read_Master_Log_Pos: 1207
Relay_Log_File: mysql-relay.000033
Relay_Log_Pos: 1366
Relay_Master_Log_File: mysql-bin.000147
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 972
Exec_Master_Log_Pos: 1207
Relay_Log_Space: 1574
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 168039296
Master_UUID: 3792e897-29cd-11e5-9e1b-525400e7dba2
Master_Info_File: /data/data/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
主:
use test;
create table t10 (id int);
insert into t10 values (10),(20),(30);
mysql> show master status ;
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000147 | 1604 | | | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
從:
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.4.19.47
Master_User: sla
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000147
Read_Master_Log_Pos: 1604
Relay_Log_File: mysql-relay.000034
Relay_Log_Pos: 676
Relay_Master_Log_File: mysql-bin.000147
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 967
Exec_Master_Log_Pos: 1604
Relay_Log_Space: 2087
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 168039296
Master_UUID: 3792e897-29cd-11e5-9e1b-525400e7dba2
Master_Info_File: /data/data/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
mysql> show create table test.t10;
ERROR 1146 (42S02): Table 'test.t10' doesn't exist
mysql> show relaylog events in 'mysql-relay.000034';
+--------------------+-----+-------------+-----------+-------------+---------------------------------------------------+
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+--------------------+-----+-------------+-----------+-------------+---------------------------------------------------+
| mysql-relay.000034 | 372 | Query | 168039296 | 1395 | use `test`; create table t10 (id int) |
| mysql-relay.000034 | 467 | Query | 168039296 | 1470 | BEGIN |
| mysql-relay.000034 | 542 | Query | 168039296 | 1577 | use `test`; insert into t10 values (10),(20),(30) |
| mysql-relay.000034 | 649 | Xid | 168039296 | 1604 | COMMIT /* xid=62440 */ |
+--------------------+-----+-------------+-----------+-------------+---------------------------------------------------+
日誌還是讀過來的。
想想有點暈,怎麼會沒有同步過來呢。
想起來,原來這個庫執行過set global sql_salve_skip_counter=1000;
mysql> show variables like '%skip%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| skip_external_locking | ON |
| skip_name_resolve | ON |
| skip_networking | OFF |
| skip_show_database | OFF |
| slave_skip_errors | OFF |
| sql_slave_skip_counter | 967 |
+------------------------+-------+
6 rows in set (0.00 sec)
其實這個在 show slave status中的Skip_Counter也是顯示出來的。
轉載請註明源出處
QQ 273002188 歡迎一起學習
QQ 群 236941212
QQ 273002188 歡迎一起學習
QQ 群 236941212
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25099483/viewspace-1795058/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 5.6 GTID 啟用情況下, 從庫跳過一個事物的方法 sql_slave_skip_counter 失效.SQL
- MySQL複製跳過錯誤--slave_skip_errors、sql_slave_skip_counter、slave_exec_modeMySqlError
- 5秒鐘內反應過來的就是高手
- sql_slave_skip_counterSQL
- 移動端window.open跳轉連結時,iOS沒有反應的問題iOS
- 儲存過程執行EXECUTE IMMEDIATE沒反應儲存過程
- sql_slave_skip_counter說明SQL
- SET GLOBAL SQL_SLAVE_SKIP_COUNTERSQL
- 【DG】DBMS_LOGSTDBY包的應用--邏輯DG跳過某些操作
- 反應性和非反應性程式碼的分離 - DZone
- 【MySql】sql_slave_skip_counter引數的用法解析MySql
- 【MySql】sql_slave_skip_counter 引數的用法解析MySql
- 《反應式應用開發》之“什麼是反應式應用”
- Android應用內外跳 — 跳轉到應用市場Android
- Android應用內外跳 -- 跳轉到應用市場Android
- Android 修改字型,跳不過的 TypefaceAndroid
- Activity過渡(跳轉)動畫動畫
- MySQL 跳過同步錯誤MySql
- iOS應用之間的跳轉解析iOS
- 反爬蟲的應對措施爬蟲
- JavaScript函式的反應性JavaScript函式
- 易優cms網站首頁輪播圖新增跳轉連結後沒有反應網站
- win10 如何跳過建立pin win10 如何跳過設定pinWin10
- 用過XMLHTTP的朋友幫幫忙,我這個點選後沒反應XMLHTTP
- 沒太多坑的微信支付
- 滑鼠反應遲鈍與反應慢故障解決方法
- Python對HTML跳脫字元進行反轉義PythonHTML字元
- 重灌win10過程怎樣跳過建立賬戶 重灌win10系統跳過建立賬戶的教程Win10
- maven 設定跳過測試Maven
- mysql主從跳過錯誤MySql
- 跳過微信過低版本的解決辦法 3.6.0.18
- 瀏覽器內外跳 -- 跳轉到指定應用瀏覽器
- 小程式開發,那些我們跳過的坑
- 跳過索引某些列任然使用索引的特性索引
- 不經歷太多
- SourceTree跳過註冊安裝使用
- 4.pytest 之 skip 跳過
- 【命令使用】rsync跳過大目錄