0% found this document useful (0 votes)
19 views

mysql replication lag problems

Uploaded by

bymash2007
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

mysql replication lag problems

Uploaded by

bymash2007
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

In order for you to know that MySQL is fully processing the SQL from the relay

logs. Try the following:

STOP SLAVE IO_THREAD;


This will stop replication from downloading new entries from the master into its
relay logs.

The other thread, known as the SQL thread, will continue processing the SQL
statements it downloaded from the master.

When you run SHOW SLAVE STATUS\G, keep your eye on Exec_Master_Log_Pos. Run SHOW
SLAVE STATUS\G again. If Exec_Master_Log_Pos does not move after a minute, you can
go ahead run START SLAVE IO_THREAD;. This may reduce the number of
Seconds_Behind_Master.

Other than that, there is really nothing you can do except to:

Trust Replication
Monitor Seconds_Behind_Master
Monitor Exec_Master_Log_Pos
Run SHOW PROCESSLIST;, take note of the SQL thread to see if it is processing long
running queries.
BTW Keep in mind that when you run SHOW PROCESSLIST; with replication running,
there should be two DB Connections whose user name is system user. One of those DB
Connections will have the current SQL statement being processed by replication. As
long as a different SQL statement is visible each time you run SHOW PROCESSLIST;,
you can trust mysql is still replicating properly.

You might also like