Database multi-source replication synchronization Error Repair

Source: Internet
Author: User


The error is this:





A database was found to have an error. The error is as follows.



Coordinator stopped because there were error (s) in the worker (s). The most recent failure Being:worker 1 failed executing transaction ' ANONYMOUS ' at Master log mysql-bin.000029, end_log_p Os 6389312. See error log and/or Performance_schema.replication_applier_status_by_worker table for more details on this failure or Others, if any.



Workaround:
Go to slave server, MySQL



1. View from library status
Mysql> Show slave status;



2. Follow the prompts from the library to find the cause.
SELECT * FROM Performance_schema.replication_applier_status_by_worker\g



This means that when a table is deleted from the main library, the deleted records are not found from the library.



There are ways to fix similar problems on the Internet.
Http://www.bcty365.com/content-35-5816-1.html



I didn't see it for a moment. (Follow-up practice, re-add)



3. Stop master-Slave synchronization first.



mysql> stop Slave;



4. Synchronize the database with the Navicate tool.
Navicate the menu bar, tools, data synchronization.
First, the structure is synchronized, then the data is synchronized.



Then, when you are finished syncing, go to the main library. With the command.
Mysql>show MASTER STATUS;



Because what I'm doing here is multi-source replication. So after synchronizing the two databases, we recorded them successively.
Get:
' mysql-bin.000029 ', ' 20698487 ',
' mysql-bin.000042 ', ' 84950954 ',



5. Clear the original sync settings
Mysql>reset slave All;



6. Set the sync again.
The following IP address, Username,password, is an example. Everyone, according to their own.



Change Master to master_host= ' 192.168.0.1 ', master_user= ' username1 ', master_port=3306,master_password= ' Password1 ', Master_log_file= ' mysql-bin.000029 ', master_log_pos=20698487 for channel ' databasename1 ';



Change Master to
Master_host= ' 192.168.0.2 ', master_user= ' username2 ', master_port=3306,master_password= ' password2 ', master_log_file = ' mysql-bin.000042 ', master_log_pos=84950954 for channel ' databasename2 ';



7. Start the synchronization
mysql> start slave;



8. View sync Status
Mysql> Show slave status;



The sync is back to normal.



Database multi-source replication synchronization Error Repair


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.