For the complete documentation index, see llms.txt. This page is also available as Markdown.

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] STATUS

Description

Provides status information about the binary log files of the primary.

This statement requires the BINLOG MONITOR privilege.

The following improved functionality is available from MariaDB 12.3.

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           |
+--------------------+----------+--------------+------------------+-----------------+

See Also

This page is licensed: GPLv2, originally from fill_help_tables.sql

spinner

Last updated

Was this helpful?