MySQL cannot master-slave replication solution _ MySQL

Source: Internet
Author: User
Spanstylefont-size: 18px; ******** The Slave Database cannot be synchronized ******** showslavestatus shows that slave_ SQL _runing is NO,
* ******* The slave database cannot be synchronized ******* the show slave status shows that slave_ SQL _runing is NO, and seconds_behind_master is null.: the program may perform write operations on slave. B: it may be caused by transaction rollback after the slave machine is restarted. 1: slave stop; set GLOBAL SQL _SLAVE_SKIP_COUNTER = 1; set a global parameter slave start; Solution 2: (1): salve (slave) database, slave stop; -- stop the master database of the slave service and show master status; get the & A log file name & B location -- get the current binary log and offset on the master server (2): salve database: View status, if yes, perform Manual synchronization on the salve server. manually change master to master_host = "192.168.101.1", master_uset = "user1", master_password = "pass123456", master_port = 3306, master_log_file = "mysql-bin.00003", step (1) found & A log file name master_log_pos = 98; step (1) found & B location -- can be manually synchronized after (3) start the salve service salve start; (4) Check that Salve_ SQL _Runing is yes through show salve status and Seconds_Behind_Master is 0.

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.