Database master-Slave process error

Source: Internet
Author: User
Tags percona

Start 134 a master-slave 1206 error occurred

last_io_errno:1236
Last_io_error:got fatal Error 1236 from master when reading data from binary log: ' Client requested Master to start repli cation from position > file size; The first event ' mysql-bin.000124 ' at 927763888, the last event read from './mysql-bin.000124 ' at 4, the last byte read fr Om './mysql-bin.000124 ' at 4. ' I'm looking for a way out of the internet
Change MASTER to master_log_file= ' mysql-bin.000124 ', master_log_pos=927763888;
No, and then I read the Binlog file in the main database.
and use the command.
Change MASTER to master_log_file= ' mysql-bin.000124 ', master_log_pos=4;  
Just fine. This command means that the master-slave synchronization is performed from the 4 position of the mysql-bin.000124.
But I this is worth this point, too forward, which caused a series of master-slave problems, let me revise the afternoon has not been modified well. In a single modification, the discovery process did not respond, kill is not possible so I restarted the MySQL found not restart
So I went through a MySQL baptism.
Look at the log found the disk is full, I delete the file, Because produced a very good mysql-relay-bin.000001 file, blurred, all the Bin-log files are deleted, it can not start, and then deleted the Mysql-bin.index, to start, but because the original bin-log files are not, also can not continue the original master and slave , you can only start from the current position of the new master and slave, equivalent to reset master and slave  
Change MASTER to master_log_file= ' mysql-bin.000124 ', master_log_pos=xxxxxxxx;
Master-slave start, due to the original character set produced a number of errors, it is more, skipping many times, so in the configuration file, etc/my.cnf set slave-skip-errors = 1062 Skip master and slave 1062 error   can be normal master and slave. But the result is that the intermediate repair data in the master-slave time is not synchronized
The master-slave consistency check is then performed to repair
Installing Percona-toolkit
/usr/local/percona-toolkit-2.2.16/bin/pt-table-checksum--user= ' root '--password= ' xxxxxx '--host=192.168.168.xxx- -port=3306--replicate=usercenter.checksums--nocheck-replication-
Filters/usr/local/percona-toolkit-2.2.16/bin/pt-table-sync--print--replicat=usercenter.checksums-- Sync-to-master h=192.168.168.xxx,p=3306,u=root,p=xxxxxx--charset=utf8/usr/local/percona-toolkit-2.2.16/bin/ Pt-table-sync--execute--replicat=usercenter.checksums--sync-to-master h=192.168.168.xxx,p=3306,u=root,p=xxxxxx- -charset=utf8 (from local to 192.168.168.xxx)
Although I only have three orders, but the original error has been set up for half a day to set up
Intermediate report of a character set error
Character set ' Utf8mb4 ' is not a compiled Character set and was not specified in the '/usr/share/mysql/charsets/index.xml ' File
Character set ' Utf8mb4 ' is not a compiled Character set and was not specified in the '/usr/share/mysql/charsets/index.xml ' File
11-27t14:40:02 DBI Connect ('; Host=192.168.168.xxx;port=3306;mysql_read_default_group=client ', ' Root ',...) failed: Can ' t initialize character set UTF8MB4 (path:/usr/share/mysql/charsets/) at/usr/local/percona-toolkit-2.2.16/bin/ Pt-table-checksum Line 1581
In the MySQL configuration file in the client part of the original utf8mb4 to comment out.
But there are still individual data that are not synchronized,

Database master-Slave process error

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.