时间:2021-07-01 10:21:17 帮助过:13人阅读
ERROR:
No query specified
解决方法1:
Slave_SQL_Running: No
1.程序可能在slave上进行了写操作
2.也可能是slave机器重起后,事务回滚造成的.
一般是事务回滚造成的:
解决办法:
mysql> stop slave ;
mysql> set GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
mysql> start slave ;
解决办法二、
首先停掉Slave服务:slave stop
到主服务器上查看主机状态:
记录File和Position对应的值
进入master
mysql> show master status;
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000003 | 32168 | test | mysql | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
然后到slave服务器上执行手动同步:
mysql> change master to
> master_host=‘192.168.43.10‘,
> master_user=‘db‘,
> master_password=‘123456‘,
> master_port=3306,
> master_log_file=‘mysql-bin.000003‘,
> master_log_pos=32168 ;
mysql> start slave ;
Mysql主从同步 异常Slave_SQL_Running: No
标签:服务器 主机 name span tls bsp pat one info