> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-binlog-status.md).

# SHOW MASTER STATUS

## Syntax

{% tabs %}
{% tab title="Current" %}

```bnf
SHOW [MASTER | BINLOG] STATUS
```

{% endtab %}

{% tab title="< 10.5.2" %}

```sql
SHOW MASTER STATUS
```

{% endtab %}
{% endtabs %}

## Description

Provides status information about the [binary log](/docs/server/server-management/server-monitoring-logs/binary-log.md) files of the primary.

{% tabs %}
{% tab title="Current" %}
This statement requires the [BINLOG MONITOR](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#binlog-monitor) privilege.
{% endtab %}

{% tab title="< 10.5.2" %}
This statement requires the [SUPER](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#super) privilege and the [REPLICATION\_CLIENT](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md#replication-client) privilege.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The following improved functionality is available from MariaDB 12.3.
{% endhint %}

To see information about the current [GTIDs](/docs/server/ha-and-performance/standard-replication/gtid.md) in the binary log, use the [gtid\_binlog\_pos](/docs/server/ha-and-performance/standard-replication/gtid.md) 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

{% tabs %}
{% tab title="Current" %}
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:

```sql
SHOW BINLOG STATUS;
+--------------------+----------+--------------+------------------+-----------------+
| File               | Position | Binlog_Do_DB | Binlog_Ignore_DB | Gtid_Binlog_Pos |
+--------------------+----------+--------------+------------------+-----------------+
| mariadb-bin.000016 |      475 |              |                  | 0-1-2           |
+--------------------+----------+--------------+------------------+-----------------+
```

{% endtab %}

{% tab title="< 12.3" %}
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`:

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

{% endtab %}
{% endtabs %}

## See Also

* [MariaDB replication](/docs/server/ha-and-performance/standard-replication.md)
* [Using and Maintaining the Binary Log](/docs/server/server-management/server-monitoring-logs/binary-log/using-and-maintaining-the-binary-log.md)
* [The gtid\_binlog\_pos variable](/docs/server/ha-and-performance/standard-replication/gtid.md)

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}
