Simple fix Master error drops inconsistent

Source: Internet
Author: User


Last_ SQL _Error: Error 'unknown table 'bb' on query. Default database: 'test'. Query: 'drop TABLE 'bb'/* generated B

The idea is to try to stop slave, reset slave, and add bb tables (define tables as needed). Remember the bin-log and position of the last change master:

Master_log_file = 'mysql-bin.000004 ',
Master_log_pos = 35123;


The procedure is as follows:

Stop slave;

Reset slave;


Use test;

Create table B (bb int );


Change master
Master_host = '10. 201.30.131 ',
Master_port = 3306,
Master_user = 'rep ',
Master_password = 'xxx ',
Master_log_file = 'mysql-bin.000004 ',
Master_log_pos = 35123;


Start slave;

Show slave status \ G;



There are still similar types of errors found, just remember that the Operation during this period is for the test database, you can skip, find the master bin-log and position at this time.



Connect to the master. Execute:

Show binlog events in 'mysql-bin.000004 'from 455827798 limit 12;



Fruitless. It is at the end of 000004.




Operations during this period are for the test database and do not affect production.

When the time is tight, only SQL _slave_skip_counter = 1 and then start slave.


Set global SQL _slave_skip_counter = 1;

Start slave SQL _thread;

Show slave status \ G;



Synchronization successful ..


This is the description only. Mysql Master/Slave is the same thing... Mechanical drip shift master log-> relay log-> slave log ..




Then, wait for the slave database to synchronize the data of the master database.


Good night.








Related Article

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.