• FLUSH STATUS
    • 语法图
    • 示例
    • MySQL 兼容性
    • 另请参阅

    FLUSH STATUS

    FLUSH STATUS 语句用于提供 MySQL 兼容性,但在 TiDB 上并无作用。因为 TiDB 使用 Prometheus 和 Grafana 而非 SHOW STATUS 来进行集中度量收集。

    语法图

    FlushStmt:

    FlushStmt

    NoWriteToBinLogAliasOpt:

    NoWriteToBinLogAliasOpt

    FlushOption:

    FlushOption

    示例

    1. mysql> show status;
    2. +--------------------+--------------------------------------+
    3. | Variable_name | Value |
    4. +--------------------+--------------------------------------+
    5. | Ssl_cipher_list | |
    6. | server_id | 93e2e07d-6bb4-4a1b-90b7-e035fae154fe |
    7. | ddl_schema_version | 141 |
    8. | Ssl_verify_mode | 0 |
    9. | Ssl_version | |
    10. | Ssl_cipher | |
    11. +--------------------+--------------------------------------+
    12. 6 rows in set (0.01 sec)
    13. mysql> show global status;
    14. +--------------------+--------------------------------------+
    15. | Variable_name | Value |
    16. +--------------------+--------------------------------------+
    17. | Ssl_cipher | |
    18. | Ssl_cipher_list | |
    19. | Ssl_verify_mode | 0 |
    20. | Ssl_version | |
    21. | server_id | 93e2e07d-6bb4-4a1b-90b7-e035fae154fe |
    22. | ddl_schema_version | 141 |
    23. +--------------------+--------------------------------------+
    24. 6 rows in set (0.00 sec)
    25. mysql> flush status;
    26. Query OK, 0 rows affected (0.00 sec)
    27. mysql> show status;
    28. +--------------------+--------------------------------------+
    29. | Variable_name | Value |
    30. +--------------------+--------------------------------------+
    31. | Ssl_cipher | |
    32. | Ssl_cipher_list | |
    33. | Ssl_verify_mode | 0 |
    34. | Ssl_version | |
    35. | ddl_schema_version | 141 |
    36. | server_id | 93e2e07d-6bb4-4a1b-90b7-e035fae154fe |
    37. +--------------------+--------------------------------------+
    38. 6 rows in set (0.00 sec)

    MySQL 兼容性

    • FLUSH STATUS 语句仅用于提供 MySQL 兼容性。

    另请参阅

    • SHOW [GLOBAL|SESSION] STATUS