In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 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.
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.