Home >Database >Mysql Tutorial >simplefix主从不一致滴error

simplefix主从不一致滴error

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 15:58:07995browse

Last_SQL_Error: Error "Unknown table 'bb'' on query. Default database: 'test'. Query: 'DROP TABLE `bb` /* generated b 思路是 尝试 stop slave,reset slave, 新增bb表(随便定义表), 记住 上一次change master 的 bin-log 及position : master_log_fil

\

Last_SQL_Error: Error "Unknown table 'bb'' on query. Default database: 'test'. Query: 'DROP TABLE `bb` /* generated b

思路是 尝试 stop slave,reset slave, 新增bb表(随便定义表), 记住 上一次change master 的 bin-log 及position :

master_log_file='mysql-bin.000004',
master_log_pos=35123;

操作如下:

stop slave;

reset slave;

use test;

create table b(bb int);

change master to
master_host='10.201.30.131',
master_port=3306,
master_user='rep',
master_password='rep!@#$',
master_log_file='mysql-bin.000004',
master_log_pos=35123;

start slave;

show slave status\G;

发现还是有差不多类型的错误,刚好记得 这段时间内的操作都是针对test库的,可以略过,查到此时卡住的 master bin-log及 position.

连接到master.执行:

show binlog events in 'mysql-bin.000004' from 455827798 limit 12;

无果。刚好是000004的末尾。

这段时间内的操作都是针对test库的,对生产不构成影响。

时间紧迫的情况下,只有 sql_slave_skip_counter=1后 再start slave了。

set global sql_slave_skip_counter = 1;

start slave sql_thread;

show slave status\G;

成功同步 。。

仅以此说明 。mysql的主从就是这么一回事 。。。 机械滴移位master log -> relay log -> slave log ..

然后,就坐等 从库同步主库的数据。

晚安。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn