MySQL Master/Slave synchronization error solved

Source: Internet
Author: User

1Error prompt

SlaveI/O:ErrorConnecting to master 'backup @ 192.168.1.x: 100'-retry-time: 60 retries: 3306, Error_code: 86400

Solution (f ā ng f ǎ)

Delete all binary log files from the server, including one data directoryMaster.infoFile andHostname-Relay-binStart File

Master.info::Record (record)MysqlConnect log files and records on the master serverPassword) 

 2Error prompt

 

ErrorReading packet from server: file'/home/Mysql/MysqlLog/log.000001 'not found (Errcode: 2) (server_errno = 29)

Solution:

Because the master server has been running for a period of time to generate binary filesSlaveYesfromLog.000001Start reading and deleting the host binary files, includingLog. indexFile

3The error message is as follows:

 

Slave SQL:Error'Table 'xxxx' doesn' t exist 'on query. default database: 't591 '. query: 'insert INTO 'xxxx' (type, post_id, browsenum) SELECT type, post_id, browsenum FROM xxxx WHERE hitdate = '000000', Error_code: 20090209

Solution (f ā ng f ǎ)

BecauseSlaveNoTableAdd Table to useSlave startYou can continue the synchronization.

 

4The error message is as follows:

Error 'duplicate entry '1' for key 1' on query. default database: 'movivi1 '. query: 'insert INTO 'v1vid0 _ user_samename 'values (null, 1, '20170101', '11', '20160301', '20160301 ')'

 

 

Error 'you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''at line 1' on query. default database: 'Club '. query: 'insert INTO club. point_process (GIVEID, GETID, POINT, CREATETIME, DEMO) VALUES (0, 4971112, 5, '2017-12-19 16:29:28 ','

1 row in set (0.00 sec)

 MYsql>SLave statusG;

Display:Slave_ SQL _RunningIsNO

Solution (f then ng f then ):

MYsql>Stop slave;

MYsql>Set global SQL _slave_skip_counter = 1;

Mysql>Start slave;

5The error message is as follows:

# Show slave statusG;

 

Master_Log_File: mysql-bin.000029

Read_Master_Log_Pos: 3154083

Relay_Log_File: c7-relay-bin.000178

Relay_Log_Pos: 633

Relay_Master_Log_File: mysql-bin.000025

Slave_IO_Running: Yes

Slave_ SQL _Running: No

Replicate_Do_DB: club

Replicate_Ignore_DB:

Replicate_Do_Table:

Replicate_Ignore_Table:

Replicate_Wild_Do_Table:

Replicate_Wild_Ignore_Table:

Last_errno.: 1594

Last_Error: Relay log read failure: cocould not parse relay log event entry. the possible reasons are: the master's binary log is upted (you can check this by running 'mysqlbinlog' on the binary log ), the slave's relay log is already upted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. if you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'show SLAVE status' on this slave.

Skip_Counter: 0

Exec_Master_Log_Pos: 1010663436

The reason for this problem is that the master data library suddenly stops or the problem (problem) terminates the change.Mysql-bin.xxxLogsSlaveIf the server cannot find this file, find the synchronization point and log file andChage masterYou can.

Solution (f then ng f then ):

 

Change master

Master_host = '2017. 103.156.198 ',

Master_user = 'synchronization account ',

Master_password = 'synchronization password (code )',

Master_port = 3306,

Master_log_file ='Mysql-bin.000025',

Master_log_pos =1010663436;

6The error message is as follows:

 

Error 'unknown column 'qdir' in 'field list' on query. Default database: 'Club '. Query: 'insert into club.Question_del(Id, pid, ques_name, givepoint, title, subject, subject_pid, createtime, approve, did, status, intime, order_d, endtime, banzhu_uid, banzhu_uname, del_cause, qdir) select id, pid, ques_name, givepoint, title, subject, subject_pid, createtime, approve, did, status, intime, order_d, endtime, '20170101', 'admin0523 ','Meaningless reply', Qdir from club. question where id = 7330212'

1 row in set (0.00 sec)

This error is an error.Club. question_delNoQdirThis field can be added.~

In the masterMysql: QueryDesc club.Question_del;

InError:Alter table question_del add qdir varchar (30) not null;

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.