Home  >  Article  >  Database  >  What should I do if navicat reports 1146 error?

What should I do if navicat reports 1146 error?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-06 14:32:119896browse

What should I do if navicat reports 1146 error?

During the master-slave replication process of MySQL, an error 1146 occurred. The reason for the error prompt is: the specified table cannot be found in the default data.

show slave status\G;Real synchronization status.

Related recommendations: "Navicat for mysql usage graphic tutorial"

Slave_IO_Running: YES
Slave_SQL_Running: No
Last_Errno: 1146
Last_Error: Error 'Table 'coop.Coop_Data' doesn't exist' on query. Default database: 'gcore'. Query: 
'update 
coop.Coop_Data set State='2',NameLevel='2',CheckedTime=now(),Memo='' where DAID='18601''
Skip_Counter: 0
Last_SQL_Errno: 1146
Last_SQL_Error: Error 'Table 'coop.Coop_Data' doesn't exist' on query. Default database: 'gcore'. Query: 
'update 
coop.Coop_Data set State='2',NameLevel='2',CheckedTime=now(),Memo='' where DAID='18601''

The reason is:

use first db_name1, and then executed the SQL statement update db_name2.table set.

Solution:

Set to ignore this error on the slave server, add "slave-skip-errors = 1146" in the my.cnf file,

If there are a small number of such errors, set "set global sql_slave_skip_counter=1" directly in the mysql client;

The above is the detailed content of What should I do if navicat reports 1146 error?. For more information, please follow other related articles on the PHP Chinese website!

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