SHOW MASTER STATUS
View the current status of the primary server's binary log. This statement returns the current log file name and position for replication synchronization.
Syntax
SHOW [MASTER | BINLOG] STATUSDescription
Provides status information about the binary log files of the primary.
This statement requires the BINLOG MONITOR privilege.
To see information about the current GTIDs in the binary log, use the gtid_binlog_pos variable. It is enabled by default, and helps find the current state of the master server. (Previously, this required two statements, SHOW MASTER STATUS and SELECT @@global.gtid_binlog_pos.)
Example
From MariaDB 12.3, SHOW BINLOG STATUS includes the Gtid_Binlog_Pos column, so a separate SELECT @@global.gtid_binlog_pos statement is no longer required to see the current GTID position:
SHOW BINLOG STATUS;
+--------------------+----------+--------------+------------------+-----------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Gtid_Binlog_Pos |
+--------------------+----------+--------------+------------------+-----------------+
| mariadb-bin.000016 | 475 | | | 0-1-2 |
+--------------------+----------+--------------+------------------+-----------------+Before MariaDB 12.3, SHOW BINLOG STATUS (or SHOW MASTER STATUS) does not include the Gtid_Binlog_Pos column. To see the current GTID position, run an additional SELECT @@global.gtid_binlog_pos:
SHOW BINLOG STATUS;
+--------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+--------------------+----------+--------------+------------------+
| mariadb-bin.000016 | 475 | | |
+--------------------+----------+--------------+------------------+
SELECT @@global.gtid_binlog_pos;
+--------------------------+
| @@global.gtid_binlog_pos |
+--------------------------+
| 0-1-2 |
+--------------------------+See Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?

