MySQL Forums
Forum List  »  Replication

some suggestions for Detecting slave replication lag without needing SUPER privilege
Posted by: slwang wang
Date: March 17, 2017 03:09AM

HI,you can read follow suggestions:
1. 'show slave status' just need REPLICATION CLIENT privilege.

2. "Seconds_Behind_Master" is sometimes inaccurate.You can check the replication status as follows:
2.1 running 'show master status' in master server and take the column 'File' and 'Position' as value one.
2.2 running 'show slave status' in slave server and take the column 'Master_Log_File' and 'Read_Master_Log_Pos' as value two
2.3 take 'Relay_Master_Log_File' and 'Exec_Master_Log_Pos' as value three

If value one, two, three is the same, the slave server and the master server have the same data. You can generate your report.

3.You can take column 'Master_log_name' and 'Master_log_pos' in table mysql.slave_master_info as value two, Take column 'Master_log_name' and 'Master_log_pos' in table mysql.slave_relay_log_info as value three.

4.If you want to use table slave_master_info and slave_relay_log_info , notice the variable 'sync_master_info'

Options: ReplyQuote


Subject
Views
Written By
Posted
some suggestions for Detecting slave replication lag without needing SUPER privilege
539
March 17, 2017 03:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.