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!