mysql线程中断_mysql主从同步slave报错,slave sql线程中断

在MySQL数据库中遇到主从同步问题,具体表现为Slave SQL线程中断,错误信息提示Lost connection to MySQL server。分析显示是由于线程在读取服务器数据时断开。解决方法包括检查和重启Slave IO线程,以及关闭并重新启动Slave服务以恢复主从同步。
摘要由CSDN通过智能技术生成

151224 16:47:10 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)

151224 16:47:10 [Note] Slave I/O thread killed while reading event

151224 16:47:10 [Note] Slave I/O thread exiting, read up to log 'cpmysql01-bin.000123', position 335505511

151224 16:47:21 [ERROR] Slave I/O: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist, Internal MariaDB error code: 1146

151224 16:47:21 [Note] Slave SQL thread initialized, starting replication in log 'cpmysql01-bin.000123' at position 335505511, relay log './mysql-relay-bin.000364' position: 335505802

151224 16:47:21 [ERROR] Slave SQL: Unable to load replication GTID slave state from mysql.gtid_slave_pos: Table 'mysql.gtid_slave_pos' doesn't exist, Internal MariaDB error code: 1146

151224 16:47:21 [Note] Slave I/O thread: connected to master 'mopgaming@103.56.195.8:3306',replication started in log 'cpmysql01-bin.000123' at position 335505511

151224 17:03:15 [Warning] IP address '103.56.195.14' could not be resolved: Name or service not known

2015-12-24 17:36:51 7f3cce0a4700 InnoDB: Recalculation of persistent statistics requested for table "lottery"."mop_bet_order" index "bet_order_created_at_index" but the required persistent statistics storage is not present or is corrupted. Using transient stats instead.

报错信息:

slave去mysql主服务器的请求丢失,导致断开主从同步SQL线程中断,slave I/0线程被杀死。

尝试解决:

show slave stutus\G;

start slave io_thread;    如果io线程没有运行,尝试重启该线程,接收mysqlbin日志

不行的话,直接关闭,启动slave

stop slave;

start slave;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值