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
The following example works in all MariaDB versions. From MariaDB 12.3, the second statement doesn't have to be run, though, because SHOW BINLOG STATUS shows the value of @@global.gtid_binlog_pos, too.
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?

