Dedyshka
Dedyshka

Reputation: 471

Getting last position in master-file-log (MySQL replication)?

How could I retrieve last position in master's log-bin? For example when I write CHANGE MASTER TO... I can't see master's status so I don't know the master-file-pos...

Upvotes: 0

Views: 3708

Answers (2)

Flo Doe
Flo Doe

Reputation: 5381

Well, I am not sure what you exactly want to achive, but do a SHOW SLAVE STATUS; and look there for Exec_Master_Log_Pos, this will give you the last position until which the slave SQL thread has executed the events from the masters binary log.

For additional information refer to the docs you can find here: SHOW SLAVE STATUS Syntax

Upvotes: 0

metalfight - user868766
metalfight - user868766

Reputation: 2750

On your master machine in mysql type:

SHOW MASTER STATUS;

mysql> SHOW MASTER STATUS;
+---------------+----------+--------------+------------------+
| File          | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+---------------+----------+--------------+------------------+
| mysql-bin.003 | 73       | test         | manual,mysql     |
+---------------+----------+--------------+------------------+

Upvotes: 2

Related Questions