错误现象:
Replicate_Wild_Ignore_Table: Last_Errno: 1146 Last_Error: Error ‘Table ‘mydb.test1146‘ doesn‘t exist‘ on query. Default database: ‘mydb‘. Query: ‘insert into test1146 values(‘bigdiao‘)‘
方法一、在slave上重建缺失的表
mysql> stop slave; Query OK, 0 rows affected (0.01 sec) mysql> create table test1146(name char(25)); Query OK, 0 rows affected (0.00 sec) mysql> start slave ; Query OK, 0 rows affected (0.00 sec)
方法二、在slave的my.cnf文件中添加一个参数,然后重启slave
## my.cnf文件中添加此行内容 replicate-ignore-table=mydb.test1146 ## 重启slave /etc/init.d/mysqld restart
如果想要使用slave-skip-errors=all或者slave-skip-errors=1146参数是无法跳过该类型错误的,详见:https://bugs.mysql.com/bug.php?id=64794。
本文出自 “勇敢向前,坚决向左” 博客,请务必保留此出处http://quenlang.blog.51cto.com/4813803/1734156
原文:http://quenlang.blog.51cto.com/4813803/1734156