This topic describes how to execute the SHOW BINARY STREAMS statement to query the binary log streams of a PolarDB-X instance.
Syntax
SHOW BINARY STREAMS;
Usage notes
Before you execute the preceding SQL statement, make sure that your account is granted the SUPER or REPLICATION CLIENT permission. For information about how to manage permissions, see Manage accounts and permissions.
Examples
Execute the following statement to query the binary log streams:
SHOW BINARY STREAMS;
The following result is returned:
+--------+-----------------+-------------------------------+----------+
| GROUP | STREAM | FILE | POSITION |
+--------+-----------------+-------------------------------+----------+
| group1 | group1_stream_0 | group1_stream_0#binlog.000001 | 3625148 |
| group1 | group1_stream_1 | group1_stream_1#binlog.000001 | 3625148 |
| group1 | group1_stream_2 | group1_stream_2#binlog.000001 | 3625148 |
| group1 | group1_stream_3 | group1_stream_3#binlog.000001 | 3625148 |
+--------+-----------------+-------------------------------+----------+