Hi,
Recently I have faced an issue in Master Slave replication.Unfortunately slave stops it replication and it throws an error as,
[ERROR] Slave SQL: Could not execute Update_rows event on table DBname.tablename; Lock wait timeout exceeded; try restarting transaction,
Error_code: 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT; the event's master log mysql-bin.******, end_log_pos *******, Error_code: 1205
To clear the error. I did,
show slave status\G
stop slave;
start slave;
Now error has gone and replication runs successfully.
It happens at sometime when a query takes long time to execute.
Thank you...
Showing posts with label MySQL replication. Show all posts
Showing posts with label MySQL replication. Show all posts
Saturday, April 27, 2013
Replication_Error: Error_code : 1205; handler error HA_ERR_LOCK_WAIT_TIMEOUT;
Labels:
handler error,
master,
master_slave replication,
MySQL replication,
show slave status.,
slave,
start slave,
stop slave
Sunday, February 3, 2013
STEPS TO DO FOR MASTER SLAVE REPLICATION IN MySQL
What is Replication?
4.Change the server id,port number and socket.
It is a process that allows you to easily maintain multiple copies of a
MySQL data by copied automatically from a master to a slave
database.
Steps to do Replications:
1.Stop the running applications in master server
2.See master status.
Note the binlog file and position in notepad for slave server
3.Create a user for replication in master
4.Change the server id,port number and socket.
5.In slave give as,
Ex: Change master to master_user='replica',
master_host='localhost',
master_password='replica',
master_log_file='mysql-bin.000015',
master_log_position=107,
port=3306;
6. Start the replication by,
Ex: start slave;
7.Import the master server databases to slave server now
Thank you.
Labels:
backup,
binarylog,
grant,
MySQL replication,
show master status,
show slave status,
startslave,
stopslave