MySQL服务器状态变量(mysqld)
下表列出了适用于的所有状态变量mysqld。
该表列出了每个变量的数据类型和范围。最后一列指示每个变量的作用域是全局变量,会话变量还是两者。有关设置和使用变量的详细信息,请参见相应的项目描述。在适当的地方,提供了指向有关该项目的更多信息的直接链接。
表5.3状态变量摘要
Variable Name Variable Type Variable Scope Aborted_clients Integer Global Aborted_connects Integer Global Acl_cache_items_count Integer Global Audit_log_current_size Integer Global Audit_log_event_max_drop_size Integer Global Audit_log_events Integer Global Audit_log_events_filtered Integer Global Audit_log_events_lost Integer Global Audit_log_events_written Integer Global Audit_log_total_size Integer Global Audit_log_write_waits Integer Global Binlog_cache_disk_use Integer Global Binlog_cache_use Integer Global Binlog_stmt_cache_disk_use Integer Global Binlog_stmt_cache_use Integer Global Bytes_received Integer Both Bytes_sent Integer Both Caching_sha2_password_rsa_public_key String Global Com_admin_commands Integer Both Com_alter_db Integer Both Com_alter_event Integer Both Com_alter_function Integer Both Com_alter_procedure Integer Both Com_alter_resource_group Integer Global Com_alter_server Integer Both Com_alter_table Integer Both Com_alter_tablespace Integer Both Com_alter_user Integer Both Com_alter_user_default_role Integer Global Com_analyze Integer Both Com_assign_to_keycache Integer Both Com_begin Integer Both Com_binlog Integer Both Com_call_procedure Integer Both Com_change_db Integer Both Com_change_master Integer Both Com_change_repl_filter Integer Both Com_check Integer Both Com_checksum Integer Both Com_clone Integer Global Com_commit Integer Both Com_create_db Integer Both Com_create_event Integer Both Com_create_function Integer Both Com_create_index Integer Both Com_create_procedure Integer Both Com_create_resource_group Integer Global Com_create_role Integer Global Com_create_server Integer Both Com_create_table Integer Both Com_create_trigger Integer Both Com_create_udf Integer Both Com_create_user Integer Both Com_create_view Integer Both Com_dealloc_sql Integer Both Com_delete Integer Both Com_delete_multi Integer Both Com_do Integer Both Com_drop_db Integer Both Com_drop_event Integer Both Com_drop_function Integer Both Com_drop_index Integer Both Com_drop_procedure Integer Both Com_drop_resource_group Integer Global Com_drop_role Integer Global Com_drop_server Integer Both Com_drop_table Integer Both Com_drop_trigger Integer Both Com_drop_user Integer Both Com_drop_view Integer Both Com_empty_query Integer Both Com_execute_sql Integer Both Com_explain_other Integer Both Com_flush Integer Both Com_get_diagnostics Integer Both Com_grant Integer Both Com_grant_roles Integer Global Com_group_replication_start Integer Global Com_group_replication_stop Integer Global Com_ha_close Integer Both Com_ha_open Integer Both Com_ha_read Integer Both Com_help Integer Both Com_insert Integer Both Com_insert_select Integer Both Com_install_component Integer Global Com_install_plugin Integer Both Com_kill Integer Both Com_load Integer Both Com_lock_tables Integer Both Com_optimize Integer Both Com_preload_keys Integer Both Com_prepare_sql Integer Both Com_purge Integer Both Com_purge_before_date Integer Both Com_release_savepoint Integer Both Com_rename_table Integer Both Com_rename_user Integer Both Com_repair Integer Both Com_replace Integer Both Com_replace_select Integer Both Com_reset Integer Both Com_resignal Integer Both Com_restart Integer Both Com_revoke Integer Both Com_revoke_all Integer Both Com_revoke_roles Integer Global Com_rollback Integer Both Com_rollback_to_savepoint Integer Both Com_savepoint Integer Both Com_select Integer Both Com_set_option Integer Both Com_set_resource_group Integer Global Com_set_role Integer Global Com_show_authors Integer Both Com_show_binlog_events Integer Both Com_show_binlogs Integer Both Com_show_charsets Integer Both Com_show_collations Integer Both Com_show_contributors Integer Both Com_show_create_db Integer Both Com_show_create_event Integer Both Com_show_create_func Integer Both Com_show_create_proc Integer Both Com_show_create_table Integer Both Com_show_create_trigger Integer Both Com_show_create_user Integer Both Com_show_databases Integer Both Com_show_engine_logs Integer Both Com_show_engine_mutex Integer Both Com_show_engine_status Integer Both Com_show_errors Integer Both Com_show_events Integer Both Com_show_fields Integer Both Com_show_function_code Integer Both Com_show_function_status Integer Both Com_show_grants Integer Both Com_show_keys Integer Both Com_show_master_status Integer Both Com_show_ndb_status Integer Both Com_show_open_tables Integer Both Com_show_plugins Integer Both Com_show_privileges Integer Both Com_show_procedure_code Integer Both Com_show_procedure_status Integer Both Com_show_processlist Integer Both Com_show_profile Integer Both Com_show_profiles Integer Both Com_show_relaylog_events Integer Both Com_show_slave_hosts Integer Both Com_show_slave_status Integer Both Com_show_status Integer Both Com_show_storage_engines Integer Both Com_show_table_status Integer Both Com_show_tables Integer Both Com_show_triggers Integer Both Com_show_variables Integer Both Com_show_warnings Integer Both Com_shutdown Integer Both Com_signal Integer Both Com_slave_start Integer Both Com_slave_stop Integer Both Com_stmt_close Integer Both Com_stmt_execute Integer Both Com_stmt_fetch Integer Both Com_stmt_prepare Integer Both Com_stmt_reprepare Integer Both Com_stmt_reset Integer Both Com_stmt_send_long_dat  Integer Both Com_truncate Integer Both Com_uninstall_component Integer Global Com_uninstall_plugin Integer Both Com_unlock_tables Integer Both Com_update Integer Both Com_update_multi Integer Both Com_xa_commit Integer Both Com_xa_end Integer Both Com_xa_prepare Integer Both Com_xa_recover Integer Both Com_xa_rollback Integer Both Com_xa_start Integer Both Compression Integer Session Compression_algorithm String Global Compression_level Integer Global Connection_control_delay_generated Integer Global Connection_errors_accept Integer Global Connection_errors_internal Integer Global Connection_errors_max_connections Integer Global Connection_errors_peer_address Integer Global Connection_errors_select Integer Global Connection_errors_tcpwrap Integer Global Connections Integer Global Created_tmp_disk_tables Integer Both Created_tmp_files Integer Global Created_tmp_tables Integer Both Current_tls_c  File name Global Current_tls_capath Directory name Global Current_tls_cert File name Global Current_tls_cipher String Global Current_tls_ciphersuites String Global Current_tls_crl File name Global Current_tls_crlpath Directory name Global Current_tls_key File name Global Current_tls_version String Global Delayed_errors Integer Global Delayed_insert_threads Integer Global Delayed_writes Integer Global dragnet.Status String Global Firewall_access_denied Integer Global Firewall_access_granted Integer Global Firewall_cached_entries Integer Global Flush_commands Integer Global group_replication_primary_member String Global Handler_commit Integer Both Handler_delete Integer Both Handler_discover Integer Both Handler_external_lock Integer Both Handler_mrr_init Integer Both Handler_prepare Integer Both Handler_read_first Integer Both Handler_read_key Integer Both Handler_read_last Integer Both Handler_read_next Integer Both Handler_read_prev Integer Both Handler_read_rnd Integer Both Handler_read_rnd_next Integer Both Handler_rollback Integer Both Handler_savepoint Integer Both Handler_savepoint_rollback Integer Both Handler_update Integer Both Handler_write Integer Both Innodb_buffer_pool_bytes_dat  Integer Global Innodb_buffer_pool_bytes_dirty Integer Global Innodb_buffer_pool_dump_status String Global Innodb_buffer_pool_load_status String Global Innodb_buffer_pool_pages_dat  Integer Global Innodb_buffer_pool_pages_dirty Integer Global Innodb_buffer_pool_pages_flushed Integer Global Innodb_buffer_pool_pages_free Integer Global Innodb_buffer_pool_pages_latched Integer Global Innodb_buffer_pool_pages_misc Integer Global Innodb_buffer_pool_pages_total Integer Global Innodb_buffer_pool_read_ahead Integer Global Innodb_buffer_pool_read_ahead_evicted Integer Global Innodb_buffer_pool_read_ahead_rnd Integer Global Innodb_buffer_pool_read_requests Integer Global Innodb_buffer_pool_reads Integer Global Innodb_buffer_pool_resize_status String Global Innodb_buffer_pool_wait_free Integer Global Innodb_buffer_pool_write_requests Integer Global Innodb_data_fsyncs Integer Global Innodb_data_pending_fsyncs Integer Global Innodb_data_pending_reads Integer Global Innodb_data_pending_writes Integer Global Innodb_data_read Integer Global Innodb_data_reads Integer Global Innodb_data_writes Integer Global Innodb_data_written Integer Global Innodb_dblwr_pages_written Integer Global Innodb_dblwr_writes Integer Global Innodb_have_atomic_builtins Integer Global Innodb_log_waits Integer Global Innodb_log_write_requests Integer Global Innodb_log_writes Integer Global Innodb_num_open_files Integer Global Innodb_os_log_fsyncs Integer Global Innodb_os_log_pending_fsyncs Integer Global Innodb_os_log_pending_writes Integer Global Innodb_os_log_written Integer Global Innodb_page_size Integer Global Innodb_pages_created Integer Global Innodb_pages_read Integer Global Innodb_pages_written Integer Global Innodb_row_lock_current_waits Integer Global Innodb_row_lock_time Integer Global Innodb_row_lock_time_avg Integer Global Innodb_row_lock_time_max Integer Global Innodb_row_lock_waits Integer Global Innodb_rows_deleted Integer Global Innodb_rows_inserted Integer Global Innodb_rows_read Integer Global Innodb_rows_updated Integer Global Innodb_system_rows_deleted Integer Global Innodb_system_rows_inserted Integer Global Innodb_system_rows_read Integer Global Innodb_truncated_status_writes Integer Global Innodb_undo_tablespaces_active Integer Global Innodb_undo_tablespaces_explicit Integer Global Innodb_undo_tablespaces_implicit Integer Global Innodb_undo_tablespaces_total Integer Global Key_blocks_not_flushed Integer Global Key_blocks_unused Integer Global Key_blocks_used Integer Global Key_read_requests Integer Global Key_reads Integer Global Key_write_requests Integer Global Key_writes Integer Global Last_query_cost Numeric Session Last_query_partial_plans Integer Session Locked_connects Integer Global Max_execution_time_exceeded Integer Both Max_execution_time_set Integer Both Max_execution_time_set_failed Integer Both Max_used_connections Integer Global Max_used_connections_time Datetime Global mecab_charset String Global Mysqlx_aborted_clients Integer Global Mysqlx_address String Global Mysqlx_bytes_received Integer Both Mysqlx_bytes_received_compressed_payload Integer Both Mysqlx_bytes_received_uncompressed_frame Integer Both Mysqlx_bytes_sent Integer Both Mysqlx_bytes_sent_compressed_payload Integer Both Mysqlx_bytes_sent_uncompressed_frame Integer Both Mysqlx_connection_accept_errors Integer Both Mysqlx_connection_errors Integer Both Mysqlx_connections_accepted Integer Global Mysqlx_connections_closed Integer Global Mysqlx_connections_rejected Integer Global Mysqlx_crud_create_view Integer Both Mysqlx_crud_delete Integer Both Mysqlx_crud_drop_view Integer Both Mysqlx_crud_find Integer Both Mysqlx_crud_insert Integer Both Mysqlx_crud_modify_view Integer Both Mysqlx_crud_update Integer Both Mysqlx_cursor_close Integer Both Mysqlx_cursor_fetch Integer Both Mysqlx_cursor_open Integer Both Mysqlx_errors_sent Integer Both Mysqlx_errors_unknown_message_type Integer Both Mysqlx_expect_close Integer Both Mysqlx_expect_open Integer Both Mysqlx_init_error Integer Both Mysqlx_notice_global_sent Integer Both Mysqlx_notice_other_sent Integer Both Mysqlx_notice_warning_sent Integer Both Mysqlx_notified_by_group_replication Integer Both Mysqlx_port String Global Mysqlx_prep_deallocate Integer Both Mysqlx_prep_execute Integer Both Mysqlx_prep_prepare Integer Both Mysqlx_rows_sent Integer Both Mysqlx_sessions Integer Global Mysqlx_sessions_accepted Integer Global Mysqlx_sessions_closed Integer Global Mysqlx_sessions_fatal_error Integer Global Mysqlx_sessions_killed Integer Global Mysqlx_sessions_rejected Integer Global Mysqlx_socket String Global Mysqlx_ssl_accept_renegotiates Integer Global Mysqlx_ssl_accepts Integer Global Mysqlx_ssl_active Integer Both Mysqlx_ssl_cipher Integer Both Mysqlx_ssl_cipher_list Integer Both Mysqlx_ssl_ctx_verify_depth Integer Both Mysqlx_ssl_ctx_verify_mode Integer Both Mysqlx_ssl_finished_accepts Integer Global Mysqlx_ssl_server_not_after Integer Global Mysqlx_ssl_server_not_before Integer Global Mysqlx_ssl_verify_depth Integer Global Mysqlx_ssl_verify_mode Integer Global Mysqlx_ssl_version Integer Both Mysqlx_stmt_create_collection Integer Both Mysqlx_stmt_create_collection_index Integer Both Mysqlx_stmt_disable_notices Integer Both Mysqlx_stmt_drop_collection Integer Both Mysqlx_stmt_drop_collection_index Integer Both Mysqlx_stmt_enable_notices Integer Both Mysqlx_stmt_ensure_collection String Both Mysqlx_stmt_execute_mysqlx Integer Both Mysqlx_stmt_execute_sql Integer Both Mysqlx_stmt_execute_xplugin Integer Both Mysqlx_stmt_get_collection_options Integer Both Mysqlx_stmt_kill_client Integer Both Mysqlx_stmt_list_clients Integer Both Mysqlx_stmt_list_notices Integer Both Mysqlx_stmt_list_objects Integer Both Mysqlx_stmt_modify_collection_options Integer Both Mysqlx_stmt_ping Integer Both Mysqlx_worker_threads Integer Global Mysqlx_worker_threads_active Integer Global Ndb_api_bytes_received_count Integer Global Ndb_api_bytes_received_count_session Integer Session Ndb_api_bytes_received_count_slave Integer Global Ndb_api_bytes_sent_count Integer Global Ndb_api_bytes_sent_count_session Integer Session Ndb_api_bytes_sent_count_slave Integer Global Ndb_api_event_bytes_count Integer Global Ndb_api_event_bytes_count_injector Integer Global Ndb_api_event_data_count Integer Global Ndb_api_event_data_count_injector Integer Global Ndb_api_event_nondata_count Integer Global Ndb_api_event_nondata_count_injector Integer Global Ndb_api_pk_op_count Integer Global Ndb_api_pk_op_count_session Integer Session Ndb_api_pk_op_count_slave Integer Global Ndb_api_pruned_scan_count Integer Global Ndb_api_pruned_scan_count_session Integer Session Ndb_api_pruned_scan_count_slave Integer Global Ndb_api_range_scan_count Integer Global Ndb_api_range_scan_count_session Integer Session Ndb_api_range_scan_count_slave Integer Global Ndb_api_read_row_count Integer Global Ndb_api_read_row_count_session Integer Session Ndb_api_read_row_count_slave Integer Global Ndb_api_scan_batch_count Integer Global Ndb_api_scan_batch_count_session Integer Session Ndb_api_scan_batch_count_slave Integer Global Ndb_api_table_scan_count Integer Global Ndb_api_table_scan_count_session Integer Session Ndb_api_table_scan_count_slave Integer Global Ndb_api_trans_abort_count Integer Global Ndb_api_trans_abort_count_session Integer Session Ndb_api_trans_abort_count_slave Integer Global Ndb_api_trans_close_count Integer Global Ndb_api_trans_close_count_session Integer Session Ndb_api_trans_close_count_slave Integer Global Ndb_api_trans_commit_count Integer Global Ndb_api_trans_commit_count_session Integer Session Ndb_api_trans_commit_count_slave Integer Global Ndb_api_trans_local_read_row_count Integer Global Ndb_api_trans_local_read_row_count_session Integer Session Ndb_api_trans_local_read_row_count_slave Integer Global Ndb_api_trans_start_count Integer Global Ndb_api_trans_start_count_session Integer Session Ndb_api_trans_start_count_slave Integer Global Ndb_api_uk_op_count Integer Global Ndb_api_uk_op_count_session Integer Session Ndb_api_uk_op_count_slave Integer Global Ndb_api_wait_exec_complete_count Integer Global Ndb_api_wait_exec_complete_count_session Integer Session Ndb_api_wait_exec_complete_count_slave Integer Global Ndb_api_wait_meta_request_count Integer Global Ndb_api_wait_meta_request_count_session Integer Session Ndb_api_wait_meta_request_count_slave Integer Global Ndb_api_wait_nanos_count Integer Global Ndb_api_wait_nanos_count_session Integer Session Ndb_api_wait_nanos_count_slave Integer Global Ndb_api_wait_scan_result_count Integer Global Ndb_api_wait_scan_result_count_session Integer Session Ndb_api_wait_scan_result_count_slave Integer Global Ndb_cluster_node_id Integer Global Ndb_config_from_host Integer Both Ndb_config_from_port Integer Both Ndb_conflict_fn_epoch Integer Global Ndb_conflict_fn_epoch_trans Integer Global Ndb_conflict_fn_epoch2 Integer Global Ndb_conflict_fn_epoch2_trans Integer Global Ndb_conflict_fn_max Integer Global Ndb_conflict_fn_old Integer Global Ndb_conflict_last_stable_epoch Integer Global Ndb_conflict_reflected_op_discard_count Integer Global Ndb_conflict_reflected_op_prepare_count Integer Global Ndb_conflict_refresh_op_count Integer Global Ndb_conflict_trans_conflict_commit_count Integer Global Ndb_conflict_trans_detect_iter_count Integer Global Ndb_conflict_trans_reject_count Integer Global Ndb_conflict_trans_row_conflict_count Integer Global Ndb_conflict_trans_row_reject_count Integer Global Ndb_epoch_delete_delete_count Integer Global Ndb_execute_count Integer Global Ndb_last_commit_epoch_server Integer Global Ndb_last_commit_epoch_session Integer Session Ndb_metadata_blacklist_size Integer Global Ndb_metadata_detected_count Integer Global Ndb_metadata_synced_count Integer Global Ndb_cluster_node_id Integer Global Ndb_number_of_data_nodes Integer Global Ndb_pruned_scan_count Integer Global Ndb_pushed_queries_defined Integer Global Ndb_pushed_queries_dropped Integer Global Ndb_pushed_queries_executed Integer Global Ndb_pushed_reads Integer Global Ndb_scan_count Integer Global Ndb_trans_hint_count_session Integer Both Not_flushed_delayed_rows Integer Global Ongoing_anonymous_gtid_violating_transaction_count Integer Global Ongoing_anonymous_transaction_count Integer Global Ongoing_automatic_gtid_violating_transaction_count Integer Global Open_files Integer Global Open_streams Integer Global Open_table_definitions Integer Global Open_tables Integer Both Opened_files Integer Global Opened_table_definitions Integer Both Opened_tables Integer Both Performance_schema_accounts_lost Integer Global Performance_schema_cond_classes_lost Integer Global Performance_schema_cond_instances_lost Integer Global Performance_schema_digest_lost Integer Global Performance_schema_file_classes_lost Integer Global Performance_schema_file_handles_lost Integer Global Performance_schema_file_instances_lost Integer Global Performance_schema_hosts_lost Integer Global Performance_schema_index_stat_lost Integer Global Performance_schema_locker_lost Integer Global Performance_schema_memory_classes_lost Integer Global Performance_schema_metadata_lock_lost Integer Global Performance_schema_mutex_classes_lost Integer Global Performance_schema_mutex_instances_lost Integer Global Performance_schema_nested_statement_lost Integer Global Performance_schema_prepared_statements_lost Integer Global Performance_schema_program_lost Integer Global Performance_schema_rwlock_classes_lost Integer Global Performance_schema_rwlock_instances_lost Integer Global Performance_schema_session_connect_attrs_longest_seen Integer Global Performance_schema_session_connect_attrs_lost Integer Global Performance_schema_socket_classes_lost Integer Global Performance_schema_socket_instances_lost Integer Global Performance_schema_stage_classes_lost Integer Global Performance_schema_statement_classes_lost Integer Global Performance_schema_table_handles_lost Integer Global Performance_schema_table_instances_lost Integer Global Performance_schema_table_lock_stat_lost Integer Global Performance_schema_thread_classes_lost Integer Global Performance_schema_thread_instances_lost Integer Global Performance_schema_users_lost Integer Global Prepared_stmt_count Integer Global Queries Integer Both Questions Integer Both Rewriter_number_loaded_rules Integer Global Rewriter_number_reloads Integer Global Rewriter_number_rewritten_queries Integer Global Rewriter_reload_error Boolean Global Rpl_semi_sync_master_clients Integer Global Rpl_semi_sync_master_net_avg_wait_time Integer Global Rpl_semi_sync_master_net_wait_time Integer Global Rpl_semi_sync_master_net_waits Integer Global Rpl_semi_sync_master_no_times Integer Global Rpl_semi_sync_master_no_tx Integer Global Rpl_semi_sync_master_status Boolean Global Rpl_semi_sync_master_timefunc_failures Integer Global Rpl_semi_sync_master_tx_avg_wait_time Integer Global Rpl_semi_sync_master_tx_wait_time Integer Global Rpl_semi_sync_master_tx_waits Integer Global Rpl_semi_sync_master_wait_pos_backtraverse Integer Global Rpl_semi_sync_master_wait_sessions Integer Global Rpl_semi_sync_master_yes_tx Integer Global Rpl_semi_sync_slave_status Boolean Global Rsa_public_key String Global Secondary_engine_execution_count Integer Both Select_full_join Integer Both Select_full_range_join Integer Both Select_range Integer Both Select_range_check Integer Both Select_scan Integer Both Slave_open_temp_tables Integer Global Slave_rows_last_search_algorithm_used String Global Slow_launch_threads Integer Both Slow_queries Integer Both Sort_merge_passes Integer Both Sort_range Integer Both Sort_rows Integer Both Sort_scan Integer Both Ssl_accept_renegotiates Integer Global Ssl_accepts Integer Global Ssl_callback_cache_hits Integer Global Ssl_cipher String Both Ssl_cipher_list String Both Ssl_client_connects Integer Global Ssl_connect_renegotiates Integer Global Ssl_ctx_verify_depth Integer Global Ssl_ctx_verify_mode Integer Global Ssl_default_timeout Integer Both Ssl_finished_accepts Integer Global Ssl_finished_connects Integer Global Ssl_server_not_after Integer Both Ssl_server_not_before Integer Both Ssl_session_cache_hits Integer Global Ssl_session_cache_misses Integer Global Ssl_session_cache_mode String Global Ssl_session_cache_overflows Integer Global Ssl_session_cache_size Integer Global Ssl_session_cache_timeouts Integer Global Ssl_sessions_reused Integer Both Ssl_used_session_cache_entries Integer Global Ssl_verify_depth Integer Both Ssl_verify_mode Integer Both Ssl_version String Both Table_locks_immediate Integer Global Table_locks_waited Integer Global Table_open_cache_hits Integer Both Table_open_cache_misses Integer Both Table_open_cache_overflows Integer Both Tc_log_max_pages_used Integer Global Tc_log_page_size Integer Global Tc_log_page_waits Integer Global Threads_cached Integer Global Threads_connected Integer Global Threads_created Integer Global Threads_running Integer Global Uptime Integer Global Uptime_since_flush_status Integer Global validate_password_dictionary_file_last_parsed Datetime Global validate_password_dictionary_file_words_count Integer Global validate_password.dictionary_file_last_parsed Datetime Global validate_password.dictionary_file_words_count Integer Global 
服务器状态变量
MySQL服务器维护许多状态变量,这些状态变量提供有关其操作的信息。您可以使用SHOW[GLOBAL | SESSION] STATUS语句参见这些变量及其值(请参见“ SHOW STATUS语句”)。可选GLOBAL关键字汇总所有连接上SESSION的值,并显示当前连接的值。
mysql>SHOW GLOBAL STATUS ; +----------------------------------- +------------ + | Variable_name | Value | +----------------------------------- +------------ + | Aborted_clients | 0 | | Aborted_connects | 0 | | Bytes_received | 155372598 | | Bytes_sent | 1176560426 | ... | Connections | 30023 | | Created_tmp_disk_tables | 0 | | Created_tmp_files | 3 | | Created_tmp_tables | 2 | ... | Threads_created | 217 | | Threads_running | 88 | | Uptime | 1389872 | +----------------------------------- +------------ +
该FLUSH STATUS语句将许多状态变量重置为0 。
本节提供每个状态变量的描述。有关状态变量的摘要,请参见“服务器状态变量参考”。
状态变量具有以下含义。
- Aborted_clients- 由于客户端在未正确关闭连接的情况下死亡而中止的连接数。请参见第B.4.2.10节“通信错误和中止的连接”。 
- Aborted_connects- 连接到MySQL服务器的失败尝试次数。请参见第B.4.2.10节“通信错误和中止的连接”。 - 有关其他与连接有关的信息,请检查状态变量和表格。 - Connection_errors_xxx- host_cache
- Binlog_cache_disk_use- 使用临时二进制日志高速缓存但超过了值 - binlog_cache_size并且使用临时文件存储事务中的语句的事务数。- 在 - Binlog_stmt_cache_disk_use状态变量中分别跟踪了导致二进制日志事务高速缓存写入磁盘的非事务性语句的数量。
- Acl_cache_items_count- 缓存的特权对象的数量。每个对象都是用户及其活动角色的特权组合。 
- Binlog_cache_use- 使用二进制日志缓存的事务数。 
- Binlog_stmt_cache_disk_use- 使用二进制日志语句高速缓存但超出了值 - binlog_stmt_cache_size并且使用临时文件存储这些语句的非事务语句的数量。
- Binlog_stmt_cache_use- 使用二进制日志语句高速缓存的非事务性语句的数量。 
- Bytes_received- 从所有客户端收到的字节数。 
- Bytes_sent- 发送给所有客户端的字节数。 
- Caching_sha2_password_rsa_public_key- caching_sha2_password身份验证插件用于基于RSA密钥对的密码交换的公用密钥。仅当服务器成功初始化由- caching_sha2_password_private_key_path和- caching_sha2_password_public_key_path系统变量命名的文件中的私钥和公用密钥时,该值才为非空。的值- Caching_sha2_password_rsa_public_key来自后一个文件。
- Com_xxx- 该声明计数器变量指示次,每次数量语句已被执行。每种类型的语句都有一个状态变量。例如,和计数和分别发言。和相似,但适用于使用多表语法的 nd 语句。 - Com_xxx- xxx- Com_delete- Com_update- DELETE- UPDATE- Com_delete_multi- Com_update_multi- DELETE- UPDATE- 即使准备好的语句参数未知或执行期间发生错误,所有变量也会增加。换句话说,它们的值对应于发出的请求数,而不是成功完成的请求数。例如,由于状态变量是为每次服务器启动而初始化的,并且不会在重新启动后持续存在,因此用于跟踪和语句的和变量通常值为零,但如果执行了or 语句但失败了,则它们可以为非零。 - Com_stmt_xxx- Com_restart- Com_shutdown- RESTART- SHUTDOWN- RESTART- SHUTDOWN- 该状态变量如下: - Com_stmt_xxx- Com_stmt_prepare
- Com_stmt_execute
- Com_stmt_fetch
- Com_stmt_send_long_dat
- Com_stmt_reset
- Com_stmt_close
 - 这些变量代表准备好的语句命令。它们的名称指的是网络层中使用的命令集。换句话说,只要执行诸如mysql_stmt_prepare(),mysql_stmt_execute()之类的预备语句API调用,它们的值就会增加。然而,并且也增加,或分别。此外,旧的声明计数器变量的值,以及增加了,和 - COM_xxx- Com_stmt_prepare- Com_stmt_execute- Com_stmt_close- PREPARE- EXECUTE- DEALLOCATE PREPARE- Com_prepare_sql- Com_execute_sql- Com_dealloc_sql- PREPARE- EXECUTE- DEALLOCATE PREPARE陈述。- Com_stmt_fetch代表从游标获取时发出的网络往返总数。- Com_stmt_reprepare表示服务器自动重新准备语句的次数,例如,在元数据更改到该语句引用的表或视图之后。reprepare操作递增- Com_stmt_reprepare,并且- Com_stmt_prepare。- Com_explain_other指示- EXPLAIN FOR CONNECTION执行的语句数。请参见“获取命名连接的执行计划信息”。- Com_change_repl_filter指示- CHANGE REPLICATION FILTER执行的语句数。
- Compression- 客户端连接是否在客户端/服务器协议中使用压缩。 - 从MySQL 8.0.18开始,不建议使用此状态变量。它将在将来的MySQL版本中删除。请参阅旧版连接压缩配置。 
- Compression_algorithm- 当前与服务器的连接所使用的压缩算法的名称。该值可以是 - protocol_compression_algorithms系统变量值中允许的任何算法。例如,- uncompressed如果连接不使用压缩,或者- zlib连接使用- zlib算法,则该值为。- 这个变量是在MySQL 8.0.18中添加的。 
- Compression_level- 当前到服务器的连接使用的压缩级别。 - zlib连接的值为6 (默认- zlib算法压缩级别),连接的值为1到22,- zstd连接的值为0- uncompressed。- 这个变量是在MySQL 8.0.18中添加的。 
- Connection_errors_xxx- 这些变量提供有关客户端连接过程中发生的错误的信息。它们仅是全局的,代表跨所有主机的连接汇总的错误计数。这些变量跟踪主机缓存未解决的错误(请参见“ DNS查找优化和主机缓存”),例如与TCP连接不相关的错误,它们发生在连接过程的早期(甚至早于IP地址是已知的),或者不是特定于任何特定IP地址的(例如,内存不足的情况)。 - Connection_errors_accept- ccept()在侦听端口上进行呼叫期间发生的错误数。
- Connection_errors_internal- 由于服务器内部错误(例如无法启动新线程或内存不足情况)而被拒绝的连接数。 
- Connection_errors_max_connections- 由于 - max_connections达到服务器限制,拒绝的连接数。
- Connection_errors_peer_address- 搜索连接客户端IP地址时发生的错误数。 
- Connection_errors_select- 呼叫侦听端口 - select()或- poll()在侦听端口上发生的错误数。(此操作失败不一定表示客户端连接被拒绝。)
- Connection_errors_tcpwrap- libwrap库拒绝的连接数。
 
- Connections- 与MySQL服务器的连接尝试次数(成功或失败)。 
- Created_tmp_disk_tables- 服务器在执行语句时创建的内部磁盘临时表的数量。 - 如果内部临时表最初是作为一个内存表创建的,但是变得太大,MySQL会自动将其转换为磁盘表。内存中临时表的最大大小为 - tmp_table_size和- max_heap_table_size值的最小值。如果- Created_tmp_disk_tables较大,则可能需要增加- tmp_table_size或- max_heap_table_size值,以减少内存中内部临时表将转换为磁盘表的可能性。- 您可以通过比较 - Created_tmp_disk_tables和- Created_tmp_tables变量的值,将创建的内部磁盘临时表的数量与创建的内部临时表的总数进行比较。- 另请参见“ MySQL中的内部临时表使用”。 
- Created_tmp_files- mysqld创建了多少个临时文件。 
- Created_tmp_tables- 服务器在执行语句时创建的内部临时表的数量。 - 您可以通过比较 - Created_tmp_disk_tables和- Created_tmp_tables变量的值,将创建的内部磁盘临时表的数量与创建的内部临时表的总数进行比较。- 另请参见“ MySQL中的内部临时表使用”。 - SHOW STATUS语句的每次调用都使用内部临时表并增加全局- Created_tmp_tables值。
- Current_tls_c- ssl_c服务器用于新连接的SSL上下文中的活动值。- ssl_c如果系统变量已更改,但- ALTER INSTANCE RELOAD TLS随后未执行以从与上下文相关的系统变量值中重新配置SSL上下文并更新相应的状态变量,则该上下文值可能与当前系统变量值不同。(值的这种潜在差异适用于与上下文相关的系统变量和状态变量的每个对应对。请参阅加密连接的服务器端运行时配置。)- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_capath- ssl_capath服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_cert- ssl_cert服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_cipher- ssl_cipher服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_ciphersuites- tls_ciphersuites服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_crl- ssl_crl服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_crlpath- ssl_crlpath服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_key- ssl_key服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Current_tls_version- tls_version服务器用于新连接的SSL上下文中的活动值。有关此状态变量与其对应的系统变量之间的关系的注释,请参阅的描述- Current_tls_c。- 该变量是在MySQL 8.0.16中添加的。 
- Delayed_errors- 不建议使用此状态变量(因为 - DELAYED不支持插入),并且在将来的版本中将其删除。
- Delayed_insert_threads- 不建议使用此状态变量(因为 - DELAYED不支持插入),并且在将来的版本中将其删除。
- Delayed_writes- 不建议使用此状态变量(因为 - DELAYED不支持插入),并且在将来的版本中将其删除。
- dragnet.Status- 最近分配给 - dragnet.log_error_filter_rules系统变量的结果,如果没有发生此分配,则为空。- 该变量是在MySQL 8.0.12中添加的。 
- Flush_commands- 服务器刷新表的次数,无论是由于用户执行了 - FLUSH TABLES语句还是由于内部服务器操作。也通过接收- COM_REFRESH分组来增加。与相比- Com_flush,表示- FLUSH已执行了多少条语句,是否为- FLUSH TABLES,- FLUSH LOGS等等。
- group_replication_primary_member- 当组以单主要模式运行时,显示主要成员的UUID。如果组以多主要模式运行,则显示一个空字符串。 - 该 - group_replication_primary_member状态变量已被弃用,并计划在未来的版本中被删除。
- Handler_commit- 内部 - COMMIT语句的数量。
- Handler_delete- 从表中删除行的次数。 
- Handler_external_lock- 服务器在每次调用其 - external_lock()函数时都会递增此变量,该调用通常发生在访问表实例的开始和结束时。存储引擎之间可能会有差异。例如,可以使用此变量来发现访问分区表的语句在发生锁定之前已修剪了多少个分区:检查该语句的计数器增加了多少,减去2(对表本身进行2次调用),然后除以2得到锁定的分区数。
- Handler_mrr_init- 服务器使用存储引擎自己的多范围读取实现进行表访问的次数。 
- Handler_prepare- 两阶段提交操作的准备阶段的计数器。 
- Handler_read_first- 索引中第一个条目的读取次数。如果此值很高,则表明服务器正在执行很多全索引扫描(例如 - SELECT col1 FROM foo,假设- col1已建立索引)。
- Handler_read_key- 基于键读取行的请求数。如果此值很高,则表明您的表已为查询正确索引。 
- Handler_read_last- 读取索引中最后一个键的请求数。使用 - ORDER BY,服务器将发出第一个密钥请求,然后发出多个下一个密钥请求,而使用- ORDER BY DESC,服务器将发出最后一个密钥请求,然后发出多个上一个密钥请求。
- Handler_read_next- 按键顺序读取下一行的请求数。如果要查询具有范围约束的索引列或进行索引扫描,则此值将增加。 
- Handler_read_prev- 按键顺序读取上一行的请求数。这种读取方法主要用于优化 - ORDER BY ... DESC。
- Handler_read_rnd- 基于固定位置读取行的请求数。如果您要执行很多需要对结果进行排序的查询,则此值很高。您可能有很多查询需要MySQL扫描整个表,或者您的联接未正确使用键。 
- Handler_read_rnd_next- 读取数据文件下一行的请求数。如果要进行大量表扫描,则此值较高。通常,这表明您的表未正确建立索引,或者未编写查询以利用您拥有的索引。 
- Handler_rollback- 存储引擎执行回滚操作的请求数。 
- Handler_savepoint- 存储引擎放置保存点的请求数。 
- Handler_savepoint_rollback- 存储引擎回滚到保存点的请求数。 
- Handler_update- 更新表中一行的请求数。 
- Handler_write- 在表中插入行的请求数。 
- Innodb_buffer_pool_dump_status- 由或的设置触发的记录缓冲池中保存的页面的操作的进度。 - InnoDB- innodb_buffer_pool_dump_at_shutdown- innodb_buffer_pool_dump_now- 有关相关信息和示例,请参见“保存和恢复缓冲池状态”。 
- Innodb_buffer_pool_load_status- 操作进度,热身的 - InnoDB缓冲池由一组阅读页面对应一个较早的时间点,通过设置触发- innodb_buffer_pool_load_at_startup或- innodb_buffer_pool_load_now。如果该操作带来了过多的开销,则可以通过设置取消它- innodb_buffer_pool_load_abort。- 有关相关信息和示例,请参见“保存和恢复缓冲池状态”。 
- Innodb_buffer_pool_bytes_dat- InnoDB缓冲池中包含数据的字节总数。该数字包括脏页和干净页。与使用相比,为了更精确地计算内存使用量- Innodb_buffer_pool_pages_dat,当压缩表导致缓冲池容纳不同大小的页面时。
- Innodb_buffer_pool_pages_dat- 数页在 - InnoDB缓冲池中包含的数据。该数字包括脏页和干净页。使用压缩表时,报告的- Innodb_buffer_pool_pages_dat值可能大于- Innodb_buffer_pool_pages_total(错误#59550)。
- Innodb_buffer_pool_bytes_dirty- 缓冲池中脏页中保存的当前字节总数。与使用相比,为了更精确地计算内存使用量,当压缩表导致缓冲池容纳不同大小的页面时。 - InnoDB- Innodb_buffer_pool_pages_dirty
- Innodb_buffer_pool_pages_dirty- 缓冲池中当前脏页的 - InnoDB数量。
- Innodb_buffer_pool_pages_flushed- 从缓冲池刷新页面的请求数。 - InnoDB
- Innodb_buffer_pool_pages_free- 自由数页的 - InnoDB缓冲池。
- Innodb_buffer_pool_pages_latched- 锁定数页的 - InnoDB缓冲池。这些是当前正在读取或写入的页面,或者由于某些其他原因而无法刷新或删除的页面。此变量的计算成本很高,因此仅- UNIV_DEBUG在服务器构建时定义了系统时才可用。
- Innodb_buffer_pool_pages_misc- 数页的 - InnoDB缓冲池,因为它们已经被分配给管理开销,如都在忙着锁定行或适应性的散列索引。这个值也被计算为- Innodb_buffer_pool_pages_total- -。- Innodb_buffer_pool_pages_free- Innodb_buffer_pool_pages_dat使用压缩表时,- Innodb_buffer_pool_pages_misc可能会报告超出范围的值(错误#59550)。
- Innodb_buffer_pool_pages_total- InnoDB缓冲池的总大小,以页为单位。使用压缩表时,报告的- Innodb_buffer_pool_pages_dat值可能大于- Innodb_buffer_pool_pages_total(错误#59550)
- Innodb_buffer_pool_read_ahead- 数页读入 - InnoDB缓冲池由预读后台线程。
- Innodb_buffer_pool_read_ahead_evicted- 由预读后台线程读入缓冲池的页面数,这些页面随后在没有被查询访问的情况下被逐出。 - InnoDB
- Innodb_buffer_pool_read_ahead_rnd- 由发起的“随机”预读次数 - InnoDB。当查询以随机顺序扫描表的大部分时,会发生这种情况。
- Innodb_buffer_pool_read_requests- 逻辑读取请求的数量。 
- Innodb_buffer_pool_reads- InnoDB不能从缓冲池满足的逻辑读取的数量,必须直接从磁盘读取。
- Innodb_buffer_pool_resize_status- 通过动态设置参数来动态调整 - InnoDB缓冲池大小的操作状态- innodb_buffer_pool_size。该- innodb_buffer_pool_size参数是动态的,它允许您在不重新启动服务器的情况下调整缓冲池的大小。有关相关信息,请参阅联机配置InnoDB缓冲池大小。
- Innodb_buffer_pool_wait_free- 通常,写入 - InnoDB缓冲池的操作是在后台进行的。当- InnoDB需要读取或创建页面并且没有可用的干净页面时,请先- InnoDB刷新一些脏页面并等待该操作完成。该计数器计算这些等待的实例。如果- innodb_buffer_pool_size已正确设置,则此值应较小。
- Innodb_buffer_pool_write_requests- 对 - InnoDB缓冲池执行的写操作数。
- Innodb_data_fsyncs- fsync()到目前为止的操作数。- fsync()呼叫频率受- innodb_flush_method配置选项设置的影响。
- Innodb_data_pending_fsyncs- 当前挂起的 - fsync()操作数。- fsync()呼叫频率受- innodb_flush_method配置选项设置的影响。
- Innodb_data_pending_reads- 当前的未决读取数。 
- Innodb_data_pending_writes- 当前挂起的写入数。 
- Innodb_data_read- 自服务器启动以来读取的数据量(以字节为单位)。 
- Innodb_data_reads- 读取的数据总数(读取OS文件)。 
- Innodb_data_writes- 数据写入总数。 
- Innodb_data_written- 到目前为止已写入的数据量,以字节为单位。 
- Innodb_dblwr_pages_written- 已写入 doublewrite缓冲区的页面数。请参见“ InnoDB磁盘I / O”。 
- Innodb_dblwr_writes- 已执行的两次写入操作的数量。请参见“ InnoDB磁盘I / O”。 
- Innodb_have_atomic_builtins- 指示服务器是否使用原子指令构建。 
- Innodb_log_waits- 次数,该日志缓冲区太小,一个等待被要求为它是冲洗,然后再继续。 
- Innodb_log_write_requests- InnoDB重做日志的写入请求数。
- Innodb_log_writes- 对 - InnoDB重做日志文件的物理写入次数。
- Innodb_num_open_files- InnoDB当前保持打开状态的文件数。
- Innodb_os_log_fsyncs- fsync()对- InnoDB重做日志文件的写入次数。
- Innodb_os_log_pending_fsyncs- 重做日志文件的挂起 - fsync()操作- InnoDB数。
- Innodb_os_log_pending_writes- 对 - InnoDB重做日志文件的暂挂写入数。
- Innodb_os_log_written- 写入 - InnoDB重做日志文件的字节数。
- Innodb_page_size- InnoDB页面大小(默认为16KB)。页面中包含许多值;页面大小使它们可以轻松转换为字节。
- Innodb_pages_created- 由 - InnoDB表上的操作创建的页面数。
- Innodb_pages_read- InnoDB通过对- InnoDB表的操作从缓冲池读取的页面数。
- Innodb_pages_written- InnoDB表上操作所写的页面数。
- Innodb_row_lock_current_waits- 当前对表的操作正在等待的行锁数 - InnoDB。
- Innodb_row_lock_time- 总的时间花在获取行锁的 - InnoDB表,以毫秒为单位。
- Innodb_row_lock_time_avg- 平均时间获取行锁的 - InnoDB表,以毫秒为单位。
- Innodb_row_lock_time_max- 最大时间获取行锁的 - InnoDB表,以毫秒为单位。
- Innodb_row_lock_waits- InnoDB表上的操作必须等待行锁定的次数。
- Innodb_rows_deleted- 从 - InnoDB表中删除的行数。
- Innodb_rows_inserted- 插入 - InnoDB表中的行数。
- Innodb_rows_read- 从 - InnoDB表中读取的行数。
- Innodb_rows_updated- InnoDB表中更新的行数。
- Innodb_system_rows_deleted- InnoDB从属于系统创建的模式的表中删除的行数。
- Innodb_system_rows_inserted- 插入 - InnoDB属于系统创建的模式的表的行数。
- Innodb_system_rows_read- InnoDB从属于系统创建的模式的表中读取的行数。
- Innodb_truncated_status_writes- SHOW ENGINE INNODB STATUS语句输出的次数已被截断。
- Innodb_undo_tablespaces_active- 活动撤消表空间的数量。包括隐 - InnoDB式(-创建)和显式(用户创建)撤消表空间。有关撤消表空间的信息,请参见“撤消表空间”。
- Innodb_undo_tablespaces_explicit- 用户创建的撤消表空间的数量。有关撤消表空间的信息,请参见“撤消表空间”。 
- Innodb_undo_tablespaces_implicit- 由创建的撤消表空间的数量 - InnoDB。- InnoDB初始化MySQL实例时,会创建两个默认的撤消表空间。有关撤消表空间的信息,请参见“撤消表空间”。
- Innodb_undo_tablespaces_total- 撤消表空间的总数。包括隐 - InnoDB式(-创建)和显式(用户创建)撤消表空间,包括活动的和非活动的。有关撤消表空间的信息,请参见“撤消表空间”。
- Key_blocks_not_flushed- MyISAM密钥缓存中已更改但尚未刷新到磁盘的密钥块数。
- Key_blocks_unused- MyISAM密钥高速缓存中未使用的块数。您可以使用此值来确定正在使用多少键高速缓存。看到的讨论- key_buffer_size在“服务器系统变量”。
- Key_blocks_used- MyISAM密钥高速缓存中已使用的块数。此值是一个高水位线,指示一次曾经使用的最大块数。
- Key_read_requests- 从 - MyISAM密钥高速缓存中读取密钥块的请求数。
- Key_reads- 从磁盘到 - MyISAM密钥高速缓存中的密钥块的物理读取数。如果- Key_reads太大,那么您的- key_buffer_size价值可能太小。高速缓存未命中率可以计算为- Key_reads/- Key_read_requests。
- Key_write_requests- 将密钥块写入 - MyISAM密钥高速缓存的请求数。
- Key_writes- 从 - MyISAM密钥高速缓存到磁盘的密钥块的物理写入次数。
- Last_query_cost- 由查询优化器计算的最后编译查询的总成本。这对于比较同一查询的不同查询计划的成本非常有用。默认值为0表示尚未编译任何查询。默认值为0。 - Last_query_cost具有会话范围。- 在MySQL 8.0.16及更高版本中,此变量显示具有多个查询块的查询的成本,将每个查询块的成本估算值相加,估算执行不可缓存子查询的次数,并将这些查询块的成本乘以子查询的执行次数。(缺陷号#92766,错误号#28786951)在MySQL 8.0.16之前, - Last_query_cost仅针对简单的“扁平”查询进行了精确计算,而对于包含子查询或的复杂查询则无法进行准确计算- UNION。(对于后者,该值设置为0。)
- Last_query_partial_plans- 查询优化器在上一个查询的执行计划构建中进行的迭代次数。 - Last_query_cost具有会话范围。
- Locked_connects- 连接到锁定的用户帐户的尝试次数。有关帐户锁定和解锁的信息,请参见“帐户锁定”。 
- Max_execution_time_exceeded- SELECT超过执行超时的语句数。
- Max_execution_time_set- SELECT设置了非零执行超时的语句数。这包括包含非零- MAX_EXECUTION_TIME优化程序提示的语句,以及不包含此类提示但在- max_execution_time系统变量指示的超时为非零时执行的语句。
- Max_execution_time_set_failed- SELECT尝试设置执行超时失败的语句数。
- Max_used_connections- 自服务器启动以来已同时使用的最大连接数。 
- Max_used_connections_time- 时间在其 - Max_used_connections达到其当前值。
- Not_flushed_delayed_rows- 不建议使用此状态变量(因为 - DELAYED不支持插入),并且在将来的版本中将其删除。
- mecab_charset- MeCab全文分析器插件当前使用的字符集。有关相关信息,请参见“ MeCab全文分析器插件”。 
- Ongoing_anonymous_transaction_count- 显示已标记为匿名的正在进行的事务数。这可以用来确保没有其他交易正在等待处理。 
- Ongoing_anonymous_gtid_violating_transaction_count- 此状态变量仅在调试版本中可用。显示使用 - gtid_next=ANONYMOUS和违反GTID一致性的正在进行的事务数。
- Ongoing_automatic_gtid_violating_transaction_count- 此状态变量仅在调试版本中可用。显示使用 - gtid_next=AUTOMATIC和违反GTID一致性的正在进行的事务数。
- Open_files- 打开的文件数。此计数包括服务器打开的常规文件。它不包括其他类型的文件,例如套接字或管道。此外,该计数不包括存储引擎使用其自身内部功能打开的文件,而不是要求服务器级别打开的文件。 
- Open_streams- 打开的流数(主要用于记录)。 
- Open_table_definitions- 高速缓存的表定义数。 
- Open_tables- 打开的表数。 
- Opened_files- 已打开的文件数 - my_open()(一个- mysys库函数)。不使用此功能打开文件的服务器部分不会增加计数。
- Opened_table_definitions- 已缓存的表定义数。 
- Opened_tables- 已打开的表数。如果 - Opened_tables太大,您的- table_open_cache价值可能太小。
- Performance_schema_xxx- “性能模式状态变量”中列出了性能模式状态变量。这些变量提供有关由于内存限制而无法加载或创建的检测的信息。 
- Prepared_stmt_count- 当前准备好的语句数。(语句的最大数目由 - max_prepared_stmt_count系统变量给定。)
- Queries- 服务器执行的语句数。与 - Questions变量不同,此变量包括在存储的程序中执行的语句。它不计数- COM_PING或- COM_STATISTICS命令。- 本节开头的讨论指出了如何将该语句计数状态变量与其他此类变量相关联。 
- Questions- 服务器执行的语句数。与 - Queries变量不同,这仅包括客户端发送给服务器的语句,而不包括在存储的程序中执行的语句。这个变量不计- COM_PING,- COM_STATISTICS,- COM_STMT_PREPARE,- COM_STMT_CLOSE,或- COM_STMT_RESET命令。- 本节开头的讨论指出了如何将该语句计数状态变量与其他此类变量相关联。 
- Rpl_semi_sync_master_clients- 半同步从站的数量。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_net_avg_wait_time- 主机等待从机应答的平均时间(以微秒为单位)。此变量始终为 - 0,已弃用,它将在以后的版本中删除。- 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_net_wait_time- 主服务器等待从属服务器答复的总时间(以微秒为单位)。此变量始终为 - 0,已弃用,它将在以后的版本中删除。- 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_net_waits- 主服务器等待从属服务器答复的总次数。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_no_times- 主服务器关闭半同步复制的次数。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_no_tx- 从站未成功确认的提交数。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_status- 半同步复制当前是否可在主服务器上运行。该值是 - ON是否已启用插件并且已发生提交确认。这是- OFF如果未启用该插件或主已经回落到异步复制因提交确认超时。- 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_timefunc_failures- 调用时间功能(例如)时主设备发生故障的次数 - gettimeofday()。- 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_tx_avg_wait_time- 主服务器等待每个事务的平均时间(以微秒为单位)。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_tx_wait_time- 主服务器等待事务的总时间(以微秒为单位)。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_tx_waits- 主服务器等待交易的总次数。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_wait_pos_backtraverse- 主节点等待事件的二进制坐标比以前等待的事件低的总次数。当事务开始等待答复的顺序与写入其二进制日志事件的顺序不同时,可能会发生这种情况。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_wait_sessions- 当前等待从属答复的会话数。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_master_yes_tx- 从站成功确认的提交数。 - 仅当安装了主端半同步复制插件时,此变量才可用。 
- Rpl_semi_sync_slave_status- 半同步复制当前是否在从属服务器上运行。这是 - ON如果已启用插件并且从属I / O线程正在运行,- OFF否则。- 仅当安装了从属端半同步复制插件时,此变量才可用。 
- Rsa_public_key- 此变量的值是 - sha256_password身份验证插件用于基于RSA密钥对的密码交换的公用密钥。仅当服务器成功初始化由- sha256_password_private_key_path和- sha256_password_public_key_path系统变量命名的文件中的私钥和公用密钥时,该值才为非空。的值- Rsa_public_key来自后一个文件。- 有关的信息 - sha256_password,请参见“ SHA-256可插拔身份验证”。
- Secondary_engine_execution_count- 供将来使用。该变量是在MySQL 8.0.13中添加的。 
- Select_full_join- 由于不使用索引而执行表扫描的联接数。如果该值不为0,则应仔细检查表的索引。 
- Select_full_range_join- 在参考表上使用范围搜索的联接数。 
- Select_range- 在第一个表上使用范围的联接数。即使值很大,这通常也不是关键问题。 
- Select_range_check- 每行之后不检查键的键联接的连接数。如果不为0,则应仔细检查表的索引。 
- Select_scan- 完全扫描第一个表的联接数。 
- Slave_open_temp_tables- 从属SQL线程当前已打开的临时表数。如果该值大于零,则关闭从站是不安全的。请参见“复制功能”。此变量报告所有复制通道的打开临时表的总数。 
- Slave_rows_last_search_algorithm_used- 此从属服务器最近使用它来查找行以进行基于行的复制的搜索算法。结果显示从站是否使用索引,表扫描或哈希作为在任何通道上执行的最后一个事务的搜索算法。 - 使用的方法取决于 - slave_rows_search_algorithms系统变量的设置以及相关表上可用的键。- 此变量仅可用于MySQL的调试版本。 
- Slow_launch_threads- slow_launch_time创建所花费的时间超过几秒钟的线程数。
- Slow_queries- 耗时超过 - long_query_time秒的查询数。无论是否启用慢查询日志,此计数器都会递增。有关该日志的信息,请参见“MySQL服务器慢查询日志”。
- Sort_merge_passes- 排序算法必须执行的合并通过次数。如果该值较大,则应考虑增加 - sort_buffer_size系统变量的值。
- Sort_range- 使用范围完成的排序数量。 
- Sort_rows- 排序的行数。 
- Sort_scan- 通过扫描表完成的排序数。 
- Ssl_accept_renegotiates- 建立连接所需的协商次数。 
- Ssl_accepts- 接受的SSL连接数。 
- Ssl_callback_cache_hits- 回调缓存命中数。 
- Ssl_cipher- 当前的加密密码(对于未加密的连接为空)。 
- Ssl_cipher_list- 可能的SSL密码列表(非SSL连接为空)。如果MySQL支持TLSv1.3,则该值包括可能的TLSv1.3密码套件。请参见“加密的连接TLS协议和密码”。 
- Ssl_client_connects- 与启用了SSL的主机的SSL连接尝试次数。 
- Ssl_connect_renegotiates- 建立与启用SSL的主服务器的连接所需的协商次数。 
- Ssl_ctx_verify_depth- SSL上下文验证深度(测试了链中的多少个证书)。 
- Ssl_ctx_verify_mode- SSL上下文验证模式。 
- Ssl_default_timeout- 默认的SSL超时。 
- Ssl_finished_accepts- 到服务器的成功SSL连接数。 
- Ssl_finished_connects- 与已启用SSL的主服务器的成功从服务器连接数。 
- Ssl_server_not_after- SSL证书有效的最后日期。要检查SSL证书到期信息,请使用以下语句: - mysql> - SHOW - STATUS LIKE 'Ssl_server_not%'; +----------------------- +-------------------------- + | Variable_name | Value | +----------------------- +-------------------------- + | Ssl_server_not_after | Apr 28 14:16:39 2025 GMT | | Ssl_server_not_before | May 1 14:16:39 2015 GMT | +----------------------- +-------------------------- +
- Ssl_server_not_before- SSL证书有效的第一个日期。 
- Ssl_session_cache_hits- SSL会话缓存命中数。 
- Ssl_session_cache_misses- SSL会话高速缓存未命中数。 
- Ssl_session_cache_mode- SSL会话缓存模式。 
- Ssl_session_cache_overflows- SSL会话高速缓存溢出的数量。 
- Ssl_session_cache_size- SSL会话缓存大小。 
- Ssl_session_cache_timeouts- SSL会话缓存超时数。 
- Ssl_sessions_reused- 从缓存中重复使用了多少SSL连接。 
- Ssl_used_session_cache_entries- 使用了多少个SSL会话缓存条目。 
- Ssl_verify_depth- 复制SSL连接的验证深度。 
- Ssl_verify_mode- 服务器用于使用SSL的连接所使用的验证模式。该值是一个位掩码;位在 - openssl/ssl.h头文件中定义:- # define SSL_VERIFY_NONE 0x00 # define SSL_VERIFY_PEER 0x01 # define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02 # define SSL_VERIFY_CLIENT_ONCE 0x04 - SSL_VERIFY_PEER表示服务器要求提供客户端证书。如果客户端提供了一个,则服务器执行验证,并且仅在验证成功时继续进行。- SSL_VERIFY_CLIENT_ONCE表示将仅在初始握手中完成对客户端证书的请求。
- Ssl_version- 连接的SSL协议版本(例如TLSv1)。如果连接未加密,则该值为空。 
- Table_locks_immediate- 可以立即授予对表锁定的请求的次数。 
- Table_locks_waited- 无法立即授予对表锁的请求并需要等待的次数。如果这很高并且您有性能问题,则应首先优化查询,然后拆分一个或多个表或使用复制。 
- Table_open_cache_hits- 打开表的命中数缓存查找。 
- Table_open_cache_misses- 打开表的未命中数缓存查找。 
- Table_open_cache_overflows- 打开表缓存的溢出次数。这是打开或关闭表之后,高速缓存实例具有未使用的条目且实例的大小大于 - table_open_cache/的次数- table_open_cache_instances。
- Tc_log_max_pages_used- 对于mysqld用作恢复内部XA事务的事务协调器时使用的日志的内存映射实现,此变量指示自服务器启动以来用于日志的最大页面数。如果产品 - Tc_log_max_pages_used和- Tc_log_page_size总是比日志大小显著少,尺寸大于必需的并且可以减小。(大小由- --log-tc-size选项。此变量未使用:不需要基于二进制日志的恢复,并且不使用内存映射的恢复日志方法,除非能够进行两阶段提交并且支持XA事务的存储引擎的数量大于一个。(- InnoDB是唯一适用的引擎。)
- Tc_log_page_size- 用于XA恢复日志的内存映射实现的页面大小。默认值使用确定 - getpagesize()。出于与所述相同的原因,未使用此变量- Tc_log_max_pages_used。
- Tc_log_page_waits- 对于恢复日志的内存映射实现,每次服务器无法提交事务且必须等待日志中的空闲页面时,此变量都会增加。如果此值较大,则可能要增加日志大小(使用该 - --log-tc-size选项)。对于基于二进制日志的恢复,由于存在两阶段提交,因此每次无法关闭二进制日志时,此变量都会增加。(关闭操作将等待所有此类事务完成。)
- Threads_cached- 线程高速缓存中的线程数。 
- Threads_connected- 当前打开的连接数。 
- Threads_created- 创建用于处理连接的线程数。如果 - Threads_created较大,则可能要增加- thread_cache_size值。高速缓存未命中率可以计算为- Threads_created/- Connections。
- Threads_running- 未休眠的线程数。 
- Uptime- 服务器已启动的秒数。 
- Uptime_since_flush_status- 自最近的 - FLUSH STATUS语句以来的秒数。
