In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Last_SQL_Errno: 1062
Last_SQL_Error: Error 'Duplicate entry '54755' for key 'PRIMARY'' on query. Default database: 'zabbix'. Query: 'INSERT INTO auditlog (userid,clock,ip,action,resourcetype,resourceid,resourcename,auditid) VALUES ('28','1510843124','60.27.136.153','3','0','28','','54755')'
After I set up the slave library, the slave library alarms 1062, as shown above:
Solution 1:
>stop slave sql_thread;
>set global sql_slave_skip_counter=1;
>start slave sql_thread;
But skipping an error will continue to report the next error.
Solution 2:
>stop slave;
#service mysqld stop
#vim /etc/my.cnf
[mysqld]
slave_skip_errors=1062 //Add this line to mysqld. 1062 is skipped.
Solution 3 Change the binlog_format of the slave library to match the master library:
The binlog format of the master library is mixed
#vim /etc/my.cnf
binlog_format=MIXED
Comment out slave_skip_errors=1062 in Solution 2.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.