Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

MySQL error handling-1146 error

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

During MySQL master-slave replication, error 1146 occurred. Error cause: The specified table was not found in the default data.

show slave status\G; Realistic synchronization status.

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 reasons are:

Use db_name1 first, then execute sql statements such as update db_name2.table set.

Solution:

Ignore this error in the slave server settings, add "slave-skip-errors = 1146" to my.cnf file,

If there is a small amount of this error, set "set global sql_slave_skip_counter=1" directly in mysql client;

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report