Documentation Home
MySQL 8.3 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.8Mb
PDF (A4) - 40.9Mb
Man Pages (TGZ) - 294.0Kb
Man Pages (Zip) - 409.0Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

MySQL 8.3 Reference Manual  /  ...  /  SHOW MASTER STATUS Statement

15.7.7.24 显示主服务器状态语句

SHOW MASTER STATUS

该语句已弃用,并将在未来版本的 MySQL 中删除。在 MySQL 8.2.0 及更高版本中,请使用 显示二进制日志状态 语句代替。

该语句提供了源服务器的二进制日志文件的状态信息。它需要 复制客户端 权限(或已弃用的 超级 权限)。

示例:

mysql> SHOW MASTER STATUS\G
*************************** 1. row ***************************
             File: source-bin.000002
         Position: 1307
     Binlog_Do_DB: test
 Binlog_Ignore_DB: manual, mysql
Executed_Gtid_Set: 3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5
1 row in set (0.00 sec)

当全局事务 ID 处于使用状态时,Executed_Gtid_Set 显示了在源服务器上执行的事务的 GTID 集合。这与该服务器上的 gtid_executed 系统变量的值相同,也是该服务器上 显示副本状态 输出中的 Executed_Gtid_Set 值相同。