小编给大家分享一下关系型数据库主从跳过错误的示例分析,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
非gtid:
停止奴隶;
设置全局SQL _ slave _ skip _ counter=1;
启动从机;
有gtid的情况:
关系型数据库显示从属状态\ G;
*************************** 1.行**************************
从机输入输出状态:等待主机发送事件
Master_Host: 192.168.2.71
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: bin.000106
read _ Master _ Log _ pos : 507171444
继电器_日志_文件:继电器。000029
Relay_Log_Pos: 927311065
中继主日志文件: bin。000105
从属输入输出运行:是
从属SQL_Running:否
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
replicate _ Wild _ Ignore _ table :
Last_Errno: 1032
Last_Error:无法对表cus _ 0042。stat _ staff _绩效执行更新行事件;在" stat_staff_performance "中找不到记录,错误代码: 1032;处理程序错误没有找到事件的主日志bin.000105,end_log_pos 927311644
Skip_Counter: 0
exec _ Master _ Log _ pos : 927310864
Relay_Log_Space: 1580915694
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: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1032
Last_SQL_Error: Could not execute Update_rows event on table cus_0042.stat_staff_performance; Can't find record in 'stat_staff_performance', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log bin.000105, end_log_pos 927311644
Replicate_Ignore_Server_Ids:
Master_Server_Id: 71
Master_UUID: c9c73c70-c089-11e7-8544-00163e0ad76e
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp: 171206 13:31:50
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: c9c73c70-c089-11e7-8544-00163e0ad76e:49794684-62500914
Executed_Gtid_Set: c9c73c70-c089-11e7-8544-00163e0ad76e:1-61492947
Auto_Position: 1
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
1 row in set (0.00 sec)
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> set gtid_next='c9c73c70-c089-11e7-8544-00163e0ad76e:61492948';
Query OK, 0 rows affected (0.00 sec)
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> set gtid_next='AUTOMATIC';
Query OK, 0 rows affected (0.00 sec)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
以上是“mysql主从跳过错误的示例分析”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!
内容来源网络,如有侵权,联系删除,本文地址:https://www.230890.com/zhan/73751.html