In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
When an error occurs when synchronization stops due to 'Duplicate entry' or abnormal shutdown of mysql, execute the following command to skip the error log and continue synchronization from the next error log:
Mysql > SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1
Mysql > slave start
There should not be too many log errors caused by abnormally shutting down mysql (once I manually restored about 8)
Duplicate entry' depends on the situation. If there are many log errors, you can only stop mysql, add-- slave-skip-errors=1062 and restart.
If a statement succeeds on master but fails on slave, and you cannot do a complete database resynchronization (that is, delete the data on slave and re-copy the snapshot of master), try:
Determine whether the data table of slave is different from that of master. Try to figure out how this happened, and then run START SLAVE after synchronizing slave's table to the same as master. If the above steps do not work or are not performed, try to see if the statement can be safely run manually (if necessary), and then ignore the next statement in master. If you decide to ignore the next statement of master, simply submit the following statement on slave: mysql > SET GLOBAL SQL_SLAVE_SKIP_COUNTER = n
Mysql > START SLAVE
If AUTO_INCREMENT or LAST_INSERT_ID () is not used in the next statement, the value of n should be 1. Otherwise, it has a value of 2. Set to 2 because AUTO_INCREMENT or LAST_INSERT_ID () occupies two logs in the binary log of master.
If it is determined that the slave accurately synchronizes the master and there is no update operation to the data table other than the slave thread, it is inferred that this is due to the difference caused by the bug. If you are using the latest version, please report this problem, and if you are using the old version, try to upgrade it. [@ more@]
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.