• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • MySQL服务器状态变量(mysqld)

    下表列出了适用于的所有状态变量mysqld

    该表列出了每个变量的数据类型和范围。最后一列指示每个变量的作用域是全局变量,会话变量还是两者。有关设置和使用变量的详细信息,请参见相应的项目描述。在适当的地方,提供了指向有关该项目的更多信息的直接链接。

    表5.3状态变量摘要

    Variable NameVariable TypeVariable Scope
    Aborted_clientsIntegerGlobal
    Aborted_connectsIntegerGlobal
    Acl_cache_items_countIntegerGlobal
    Audit_log_current_sizeIntegerGlobal
    Audit_log_event_max_drop_sizeIntegerGlobal
    Audit_log_eventsIntegerGlobal
    Audit_log_events_filteredIntegerGlobal
    Audit_log_events_lostIntegerGlobal
    Audit_log_events_writtenIntegerGlobal
    Audit_log_total_sizeIntegerGlobal
    Audit_log_write_waitsIntegerGlobal
    Binlog_cache_disk_useIntegerGlobal
    Binlog_cache_useIntegerGlobal
    Binlog_stmt_cache_disk_useIntegerGlobal
    Binlog_stmt_cache_useIntegerGlobal
    Bytes_receivedIntegerBoth
    Bytes_sentIntegerBoth
    Caching_sha2_password_rsa_public_keyStringGlobal
    Com_admin_commandsIntegerBoth
    Com_alter_dbIntegerBoth
    Com_alter_eventIntegerBoth
    Com_alter_functionIntegerBoth
    Com_alter_procedureIntegerBoth
    Com_alter_resource_groupIntegerGlobal
    Com_alter_serverIntegerBoth
    Com_alter_tableIntegerBoth
    Com_alter_tablespaceIntegerBoth
    Com_alter_userIntegerBoth
    Com_alter_user_default_roleIntegerGlobal
    Com_analyzeIntegerBoth
    Com_assign_to_keycacheIntegerBoth
    Com_beginIntegerBoth
    Com_binlogIntegerBoth
    Com_call_procedureIntegerBoth
    Com_change_dbIntegerBoth
    Com_change_masterIntegerBoth
    Com_change_repl_filterIntegerBoth
    Com_checkIntegerBoth
    Com_checksumIntegerBoth
    Com_cloneIntegerGlobal
    Com_commitIntegerBoth
    Com_create_dbIntegerBoth
    Com_create_eventIntegerBoth
    Com_create_functionIntegerBoth
    Com_create_indexIntegerBoth
    Com_create_procedureIntegerBoth
    Com_create_resource_groupIntegerGlobal
    Com_create_roleIntegerGlobal
    Com_create_serverIntegerBoth
    Com_create_tableIntegerBoth
    Com_create_triggerIntegerBoth
    Com_create_udfIntegerBoth
    Com_create_userIntegerBoth
    Com_create_viewIntegerBoth
    Com_dealloc_sqlIntegerBoth
    Com_deleteIntegerBoth
    Com_delete_multiIntegerBoth
    Com_doIntegerBoth
    Com_drop_dbIntegerBoth
    Com_drop_eventIntegerBoth
    Com_drop_functionIntegerBoth
    Com_drop_indexIntegerBoth
    Com_drop_procedureIntegerBoth
    Com_drop_resource_groupIntegerGlobal
    Com_drop_roleIntegerGlobal
    Com_drop_serverIntegerBoth
    Com_drop_tableIntegerBoth
    Com_drop_triggerIntegerBoth
    Com_drop_userIntegerBoth
    Com_drop_viewIntegerBoth
    Com_empty_queryIntegerBoth
    Com_execute_sqlIntegerBoth
    Com_explain_otherIntegerBoth
    Com_flushIntegerBoth
    Com_get_diagnosticsIntegerBoth
    Com_grantIntegerBoth
    Com_grant_rolesIntegerGlobal
    Com_group_replication_startIntegerGlobal
    Com_group_replication_stopIntegerGlobal
    Com_ha_closeIntegerBoth
    Com_ha_openIntegerBoth
    Com_ha_readIntegerBoth
    Com_helpIntegerBoth
    Com_insertIntegerBoth
    Com_insert_selectIntegerBoth
    Com_install_componentIntegerGlobal
    Com_install_pluginIntegerBoth
    Com_killIntegerBoth
    Com_loadIntegerBoth
    Com_lock_tablesIntegerBoth
    Com_optimizeIntegerBoth
    Com_preload_keysIntegerBoth
    Com_prepare_sqlIntegerBoth
    Com_purgeIntegerBoth
    Com_purge_before_dateIntegerBoth
    Com_release_savepointIntegerBoth
    Com_rename_tableIntegerBoth
    Com_rename_userIntegerBoth
    Com_repairIntegerBoth
    Com_replaceIntegerBoth
    Com_replace_selectIntegerBoth
    Com_resetIntegerBoth
    Com_resignalIntegerBoth
    Com_restartIntegerBoth
    Com_revokeIntegerBoth
    Com_revoke_allIntegerBoth
    Com_revoke_rolesIntegerGlobal
    Com_rollbackIntegerBoth
    Com_rollback_to_savepointIntegerBoth
    Com_savepointIntegerBoth
    Com_selectIntegerBoth
    Com_set_optionIntegerBoth
    Com_set_resource_groupIntegerGlobal
    Com_set_roleIntegerGlobal
    Com_show_authorsIntegerBoth
    Com_show_binlog_eventsIntegerBoth
    Com_show_binlogsIntegerBoth
    Com_show_charsetsIntegerBoth
    Com_show_collationsIntegerBoth
    Com_show_contributorsIntegerBoth
    Com_show_create_dbIntegerBoth
    Com_show_create_eventIntegerBoth
    Com_show_create_funcIntegerBoth
    Com_show_create_procIntegerBoth
    Com_show_create_tableIntegerBoth
    Com_show_create_triggerIntegerBoth
    Com_show_create_userIntegerBoth
    Com_show_databasesIntegerBoth
    Com_show_engine_logsIntegerBoth
    Com_show_engine_mutexIntegerBoth
    Com_show_engine_statusIntegerBoth
    Com_show_errorsIntegerBoth
    Com_show_eventsIntegerBoth
    Com_show_fieldsIntegerBoth
    Com_show_function_codeIntegerBoth
    Com_show_function_statusIntegerBoth
    Com_show_grantsIntegerBoth
    Com_show_keysIntegerBoth
    Com_show_master_statusIntegerBoth
    Com_show_ndb_statusIntegerBoth
    Com_show_open_tablesIntegerBoth
    Com_show_pluginsIntegerBoth
    Com_show_privilegesIntegerBoth
    Com_show_procedure_codeIntegerBoth
    Com_show_procedure_statusIntegerBoth
    Com_show_processlistIntegerBoth
    Com_show_profileIntegerBoth
    Com_show_profilesIntegerBoth
    Com_show_relaylog_eventsIntegerBoth
    Com_show_slave_hostsIntegerBoth
    Com_show_slave_statusIntegerBoth
    Com_show_statusIntegerBoth
    Com_show_storage_enginesIntegerBoth
    Com_show_table_statusIntegerBoth
    Com_show_tablesIntegerBoth
    Com_show_triggersIntegerBoth
    Com_show_variablesIntegerBoth
    Com_show_warningsIntegerBoth
    Com_shutdownIntegerBoth
    Com_signalIntegerBoth
    Com_slave_startIntegerBoth
    Com_slave_stopIntegerBoth
    Com_stmt_closeIntegerBoth
    Com_stmt_executeIntegerBoth
    Com_stmt_fetchIntegerBoth
    Com_stmt_prepareIntegerBoth
    Com_stmt_reprepareIntegerBoth
    Com_stmt_resetIntegerBoth
    Com_stmt_send_long_dat IntegerBoth
    Com_truncateIntegerBoth
    Com_uninstall_componentIntegerGlobal
    Com_uninstall_pluginIntegerBoth
    Com_unlock_tablesIntegerBoth
    Com_updateIntegerBoth
    Com_update_multiIntegerBoth
    Com_xa_commitIntegerBoth
    Com_xa_endIntegerBoth
    Com_xa_prepareIntegerBoth
    Com_xa_recoverIntegerBoth
    Com_xa_rollbackIntegerBoth
    Com_xa_startIntegerBoth
    CompressionIntegerSession
    Compression_algorithmStringGlobal
    Compression_levelIntegerGlobal
    Connection_control_delay_generatedIntegerGlobal
    Connection_errors_acceptIntegerGlobal
    Connection_errors_internalIntegerGlobal
    Connection_errors_max_connectionsIntegerGlobal
    Connection_errors_peer_addressIntegerGlobal
    Connection_errors_selectIntegerGlobal
    Connection_errors_tcpwrapIntegerGlobal
    ConnectionsIntegerGlobal
    Created_tmp_disk_tablesIntegerBoth
    Created_tmp_filesIntegerGlobal
    Created_tmp_tablesIntegerBoth
    Current_tls_c File nameGlobal
    Current_tls_capathDirectory nameGlobal
    Current_tls_certFile nameGlobal
    Current_tls_cipherStringGlobal
    Current_tls_ciphersuitesStringGlobal
    Current_tls_crlFile nameGlobal
    Current_tls_crlpathDirectory nameGlobal
    Current_tls_keyFile nameGlobal
    Current_tls_versionStringGlobal
    Delayed_errorsIntegerGlobal
    Delayed_insert_threadsIntegerGlobal
    Delayed_writesIntegerGlobal
    dragnet.StatusStringGlobal
    Firewall_access_deniedIntegerGlobal
    Firewall_access_grantedIntegerGlobal
    Firewall_cached_entriesIntegerGlobal
    Flush_commandsIntegerGlobal
    group_replication_primary_memberStringGlobal
    Handler_commitIntegerBoth
    Handler_deleteIntegerBoth
    Handler_discoverIntegerBoth
    Handler_external_lockIntegerBoth
    Handler_mrr_initIntegerBoth
    Handler_prepareIntegerBoth
    Handler_read_firstIntegerBoth
    Handler_read_keyIntegerBoth
    Handler_read_lastIntegerBoth
    Handler_read_nextIntegerBoth
    Handler_read_prevIntegerBoth
    Handler_read_rndIntegerBoth
    Handler_read_rnd_nextIntegerBoth
    Handler_rollbackIntegerBoth
    Handler_savepointIntegerBoth
    Handler_savepoint_rollbackIntegerBoth
    Handler_updateIntegerBoth
    Handler_writeIntegerBoth
    Innodb_buffer_pool_bytes_dat IntegerGlobal
    Innodb_buffer_pool_bytes_dirtyIntegerGlobal
    Innodb_buffer_pool_dump_statusStringGlobal
    Innodb_buffer_pool_load_statusStringGlobal
    Innodb_buffer_pool_pages_dat IntegerGlobal
    Innodb_buffer_pool_pages_dirtyIntegerGlobal
    Innodb_buffer_pool_pages_flushedIntegerGlobal
    Innodb_buffer_pool_pages_freeIntegerGlobal
    Innodb_buffer_pool_pages_latchedIntegerGlobal
    Innodb_buffer_pool_pages_miscIntegerGlobal
    Innodb_buffer_pool_pages_totalIntegerGlobal
    Innodb_buffer_pool_read_aheadIntegerGlobal
    Innodb_buffer_pool_read_ahead_evictedIntegerGlobal
    Innodb_buffer_pool_read_ahead_rndIntegerGlobal
    Innodb_buffer_pool_read_requestsIntegerGlobal
    Innodb_buffer_pool_readsIntegerGlobal
    Innodb_buffer_pool_resize_statusStringGlobal
    Innodb_buffer_pool_wait_freeIntegerGlobal
    Innodb_buffer_pool_write_requestsIntegerGlobal
    Innodb_data_fsyncsIntegerGlobal
    Innodb_data_pending_fsyncsIntegerGlobal
    Innodb_data_pending_readsIntegerGlobal
    Innodb_data_pending_writesIntegerGlobal
    Innodb_data_readIntegerGlobal
    Innodb_data_readsIntegerGlobal
    Innodb_data_writesIntegerGlobal
    Innodb_data_writtenIntegerGlobal
    Innodb_dblwr_pages_writtenIntegerGlobal
    Innodb_dblwr_writesIntegerGlobal
    Innodb_have_atomic_builtinsIntegerGlobal
    Innodb_log_waitsIntegerGlobal
    Innodb_log_write_requestsIntegerGlobal
    Innodb_log_writesIntegerGlobal
    Innodb_num_open_filesIntegerGlobal
    Innodb_os_log_fsyncsIntegerGlobal
    Innodb_os_log_pending_fsyncsIntegerGlobal
    Innodb_os_log_pending_writesIntegerGlobal
    Innodb_os_log_writtenIntegerGlobal
    Innodb_page_sizeIntegerGlobal
    Innodb_pages_createdIntegerGlobal
    Innodb_pages_readIntegerGlobal
    Innodb_pages_writtenIntegerGlobal
    Innodb_row_lock_current_waitsIntegerGlobal
    Innodb_row_lock_timeIntegerGlobal
    Innodb_row_lock_time_avgIntegerGlobal
    Innodb_row_lock_time_maxIntegerGlobal
    Innodb_row_lock_waitsIntegerGlobal
    Innodb_rows_deletedIntegerGlobal
    Innodb_rows_insertedIntegerGlobal
    Innodb_rows_readIntegerGlobal
    Innodb_rows_updatedIntegerGlobal
    Innodb_system_rows_deletedIntegerGlobal
    Innodb_system_rows_insertedIntegerGlobal
    Innodb_system_rows_readIntegerGlobal
    Innodb_truncated_status_writesIntegerGlobal
    Innodb_undo_tablespaces_activeIntegerGlobal
    Innodb_undo_tablespaces_explicitIntegerGlobal
    Innodb_undo_tablespaces_implicitIntegerGlobal
    Innodb_undo_tablespaces_totalIntegerGlobal
    Key_blocks_not_flushedIntegerGlobal
    Key_blocks_unusedIntegerGlobal
    Key_blocks_usedIntegerGlobal
    Key_read_requestsIntegerGlobal
    Key_readsIntegerGlobal
    Key_write_requestsIntegerGlobal
    Key_writesIntegerGlobal
    Last_query_costNumericSession
    Last_query_partial_plansIntegerSession
    Locked_connectsIntegerGlobal
    Max_execution_time_exceededIntegerBoth
    Max_execution_time_setIntegerBoth
    Max_execution_time_set_failedIntegerBoth
    Max_used_connectionsIntegerGlobal
    Max_used_connections_timeDatetimeGlobal
    mecab_charsetStringGlobal
    Mysqlx_aborted_clientsIntegerGlobal
    Mysqlx_addressStringGlobal
    Mysqlx_bytes_receivedIntegerBoth
    Mysqlx_bytes_received_compressed_payloadIntegerBoth
    Mysqlx_bytes_received_uncompressed_frameIntegerBoth
    Mysqlx_bytes_sentIntegerBoth
    Mysqlx_bytes_sent_compressed_payloadIntegerBoth
    Mysqlx_bytes_sent_uncompressed_frameIntegerBoth
    Mysqlx_connection_accept_errorsIntegerBoth
    Mysqlx_connection_errorsIntegerBoth
    Mysqlx_connections_acceptedIntegerGlobal
    Mysqlx_connections_closedIntegerGlobal
    Mysqlx_connections_rejectedIntegerGlobal
    Mysqlx_crud_create_viewIntegerBoth
    Mysqlx_crud_deleteIntegerBoth
    Mysqlx_crud_drop_viewIntegerBoth
    Mysqlx_crud_findIntegerBoth
    Mysqlx_crud_insertIntegerBoth
    Mysqlx_crud_modify_viewIntegerBoth
    Mysqlx_crud_updateIntegerBoth
    Mysqlx_cursor_closeIntegerBoth
    Mysqlx_cursor_fetchIntegerBoth
    Mysqlx_cursor_openIntegerBoth
    Mysqlx_errors_sentIntegerBoth
    Mysqlx_errors_unknown_message_typeIntegerBoth
    Mysqlx_expect_closeIntegerBoth
    Mysqlx_expect_openIntegerBoth
    Mysqlx_init_errorIntegerBoth
    Mysqlx_notice_global_sentIntegerBoth
    Mysqlx_notice_other_sentIntegerBoth
    Mysqlx_notice_warning_sentIntegerBoth
    Mysqlx_notified_by_group_replicationIntegerBoth
    Mysqlx_portStringGlobal
    Mysqlx_prep_deallocateIntegerBoth
    Mysqlx_prep_executeIntegerBoth
    Mysqlx_prep_prepareIntegerBoth
    Mysqlx_rows_sentIntegerBoth
    Mysqlx_sessionsIntegerGlobal
    Mysqlx_sessions_acceptedIntegerGlobal
    Mysqlx_sessions_closedIntegerGlobal
    Mysqlx_sessions_fatal_errorIntegerGlobal
    Mysqlx_sessions_killedIntegerGlobal
    Mysqlx_sessions_rejectedIntegerGlobal
    Mysqlx_socketStringGlobal
    Mysqlx_ssl_accept_renegotiatesIntegerGlobal
    Mysqlx_ssl_acceptsIntegerGlobal
    Mysqlx_ssl_activeIntegerBoth
    Mysqlx_ssl_cipherIntegerBoth
    Mysqlx_ssl_cipher_listIntegerBoth
    Mysqlx_ssl_ctx_verify_depthIntegerBoth
    Mysqlx_ssl_ctx_verify_modeIntegerBoth
    Mysqlx_ssl_finished_acceptsIntegerGlobal
    Mysqlx_ssl_server_not_afterIntegerGlobal
    Mysqlx_ssl_server_not_beforeIntegerGlobal
    Mysqlx_ssl_verify_depthIntegerGlobal
    Mysqlx_ssl_verify_modeIntegerGlobal
    Mysqlx_ssl_versionIntegerBoth
    Mysqlx_stmt_create_collectionIntegerBoth
    Mysqlx_stmt_create_collection_indexIntegerBoth
    Mysqlx_stmt_disable_noticesIntegerBoth
    Mysqlx_stmt_drop_collectionIntegerBoth
    Mysqlx_stmt_drop_collection_indexIntegerBoth
    Mysqlx_stmt_enable_noticesIntegerBoth
    Mysqlx_stmt_ensure_collectionStringBoth
    Mysqlx_stmt_execute_mysqlxIntegerBoth
    Mysqlx_stmt_execute_sqlIntegerBoth
    Mysqlx_stmt_execute_xpluginIntegerBoth
    Mysqlx_stmt_get_collection_optionsIntegerBoth
    Mysqlx_stmt_kill_clientIntegerBoth
    Mysqlx_stmt_list_clientsIntegerBoth
    Mysqlx_stmt_list_noticesIntegerBoth
    Mysqlx_stmt_list_objectsIntegerBoth
    Mysqlx_stmt_modify_collection_optionsIntegerBoth
    Mysqlx_stmt_pingIntegerBoth
    Mysqlx_worker_threadsIntegerGlobal
    Mysqlx_worker_threads_activeIntegerGlobal
    Ndb_api_bytes_received_countIntegerGlobal
    Ndb_api_bytes_received_count_sessionIntegerSession
    Ndb_api_bytes_received_count_slaveIntegerGlobal
    Ndb_api_bytes_sent_countIntegerGlobal
    Ndb_api_bytes_sent_count_sessionIntegerSession
    Ndb_api_bytes_sent_count_slaveIntegerGlobal
    Ndb_api_event_bytes_countIntegerGlobal
    Ndb_api_event_bytes_count_injectorIntegerGlobal
    Ndb_api_event_data_countIntegerGlobal
    Ndb_api_event_data_count_injectorIntegerGlobal
    Ndb_api_event_nondata_countIntegerGlobal
    Ndb_api_event_nondata_count_injectorIntegerGlobal
    Ndb_api_pk_op_countIntegerGlobal
    Ndb_api_pk_op_count_sessionIntegerSession
    Ndb_api_pk_op_count_slaveIntegerGlobal
    Ndb_api_pruned_scan_countIntegerGlobal
    Ndb_api_pruned_scan_count_sessionIntegerSession
    Ndb_api_pruned_scan_count_slaveIntegerGlobal
    Ndb_api_range_scan_countIntegerGlobal
    Ndb_api_range_scan_count_sessionIntegerSession
    Ndb_api_range_scan_count_slaveIntegerGlobal
    Ndb_api_read_row_countIntegerGlobal
    Ndb_api_read_row_count_sessionIntegerSession
    Ndb_api_read_row_count_slaveIntegerGlobal
    Ndb_api_scan_batch_countIntegerGlobal
    Ndb_api_scan_batch_count_sessionIntegerSession
    Ndb_api_scan_batch_count_slaveIntegerGlobal
    Ndb_api_table_scan_countIntegerGlobal
    Ndb_api_table_scan_count_sessionIntegerSession
    Ndb_api_table_scan_count_slaveIntegerGlobal
    Ndb_api_trans_abort_countIntegerGlobal
    Ndb_api_trans_abort_count_sessionIntegerSession
    Ndb_api_trans_abort_count_slaveIntegerGlobal
    Ndb_api_trans_close_countIntegerGlobal
    Ndb_api_trans_close_count_sessionIntegerSession
    Ndb_api_trans_close_count_slaveIntegerGlobal
    Ndb_api_trans_commit_countIntegerGlobal
    Ndb_api_trans_commit_count_sessionIntegerSession
    Ndb_api_trans_commit_count_slaveIntegerGlobal
    Ndb_api_trans_local_read_row_countIntegerGlobal
    Ndb_api_trans_local_read_row_count_sessionIntegerSession
    Ndb_api_trans_local_read_row_count_slaveIntegerGlobal
    Ndb_api_trans_start_countIntegerGlobal
    Ndb_api_trans_start_count_sessionIntegerSession
    Ndb_api_trans_start_count_slaveIntegerGlobal
    Ndb_api_uk_op_countIntegerGlobal
    Ndb_api_uk_op_count_sessionIntegerSession
    Ndb_api_uk_op_count_slaveIntegerGlobal
    Ndb_api_wait_exec_complete_countIntegerGlobal
    Ndb_api_wait_exec_complete_count_sessionIntegerSession
    Ndb_api_wait_exec_complete_count_slaveIntegerGlobal
    Ndb_api_wait_meta_request_countIntegerGlobal
    Ndb_api_wait_meta_request_count_sessionIntegerSession
    Ndb_api_wait_meta_request_count_slaveIntegerGlobal
    Ndb_api_wait_nanos_countIntegerGlobal
    Ndb_api_wait_nanos_count_sessionIntegerSession
    Ndb_api_wait_nanos_count_slaveIntegerGlobal
    Ndb_api_wait_scan_result_countIntegerGlobal
    Ndb_api_wait_scan_result_count_sessionIntegerSession
    Ndb_api_wait_scan_result_count_slaveIntegerGlobal
    Ndb_cluster_node_idIntegerGlobal
    Ndb_config_from_hostIntegerBoth
    Ndb_config_from_portIntegerBoth
    Ndb_conflict_fn_epochIntegerGlobal
    Ndb_conflict_fn_epoch_transIntegerGlobal
    Ndb_conflict_fn_epoch2IntegerGlobal
    Ndb_conflict_fn_epoch2_transIntegerGlobal
    Ndb_conflict_fn_maxIntegerGlobal
    Ndb_conflict_fn_oldIntegerGlobal
    Ndb_conflict_last_stable_epochIntegerGlobal
    Ndb_conflict_reflected_op_discard_countIntegerGlobal
    Ndb_conflict_reflected_op_prepare_countIntegerGlobal
    Ndb_conflict_refresh_op_countIntegerGlobal
    Ndb_conflict_trans_conflict_commit_countIntegerGlobal
    Ndb_conflict_trans_detect_iter_countIntegerGlobal
    Ndb_conflict_trans_reject_countIntegerGlobal
    Ndb_conflict_trans_row_conflict_countIntegerGlobal
    Ndb_conflict_trans_row_reject_countIntegerGlobal
    Ndb_epoch_delete_delete_countIntegerGlobal
    Ndb_execute_countIntegerGlobal
    Ndb_last_commit_epoch_serverIntegerGlobal
    Ndb_last_commit_epoch_sessionIntegerSession
    Ndb_metadata_blacklist_sizeIntegerGlobal
    Ndb_metadata_detected_countIntegerGlobal
    Ndb_metadata_synced_countIntegerGlobal
    Ndb_cluster_node_idIntegerGlobal
    Ndb_number_of_data_nodesIntegerGlobal
    Ndb_pruned_scan_countIntegerGlobal
    Ndb_pushed_queries_definedIntegerGlobal
    Ndb_pushed_queries_droppedIntegerGlobal
    Ndb_pushed_queries_executedIntegerGlobal
    Ndb_pushed_readsIntegerGlobal
    Ndb_scan_countIntegerGlobal
    Ndb_trans_hint_count_sessionIntegerBoth
    Not_flushed_delayed_rowsIntegerGlobal
    Ongoing_anonymous_gtid_violating_transaction_countIntegerGlobal
    Ongoing_anonymous_transaction_countIntegerGlobal
    Ongoing_automatic_gtid_violating_transaction_countIntegerGlobal
    Open_filesIntegerGlobal
    Open_streamsIntegerGlobal
    Open_table_definitionsIntegerGlobal
    Open_tablesIntegerBoth
    Opened_filesIntegerGlobal
    Opened_table_definitionsIntegerBoth
    Opened_tablesIntegerBoth
    Performance_schema_accounts_lostIntegerGlobal
    Performance_schema_cond_classes_lostIntegerGlobal
    Performance_schema_cond_instances_lostIntegerGlobal
    Performance_schema_digest_lostIntegerGlobal
    Performance_schema_file_classes_lostIntegerGlobal
    Performance_schema_file_handles_lostIntegerGlobal
    Performance_schema_file_instances_lostIntegerGlobal
    Performance_schema_hosts_lostIntegerGlobal
    Performance_schema_index_stat_lostIntegerGlobal
    Performance_schema_locker_lostIntegerGlobal
    Performance_schema_memory_classes_lostIntegerGlobal
    Performance_schema_metadata_lock_lostIntegerGlobal
    Performance_schema_mutex_classes_lostIntegerGlobal
    Performance_schema_mutex_instances_lostIntegerGlobal
    Performance_schema_nested_statement_lostIntegerGlobal
    Performance_schema_prepared_statements_lostIntegerGlobal
    Performance_schema_program_lostIntegerGlobal
    Performance_schema_rwlock_classes_lostIntegerGlobal
    Performance_schema_rwlock_instances_lostIntegerGlobal
    Performance_schema_session_connect_attrs_longest_seenIntegerGlobal
    Performance_schema_session_connect_attrs_lostIntegerGlobal
    Performance_schema_socket_classes_lostIntegerGlobal
    Performance_schema_socket_instances_lostIntegerGlobal
    Performance_schema_stage_classes_lostIntegerGlobal
    Performance_schema_statement_classes_lostIntegerGlobal
    Performance_schema_table_handles_lostIntegerGlobal
    Performance_schema_table_instances_lostIntegerGlobal
    Performance_schema_table_lock_stat_lostIntegerGlobal
    Performance_schema_thread_classes_lostIntegerGlobal
    Performance_schema_thread_instances_lostIntegerGlobal
    Performance_schema_users_lostIntegerGlobal
    Prepared_stmt_countIntegerGlobal
    QueriesIntegerBoth
    QuestionsIntegerBoth
    Rewriter_number_loaded_rulesIntegerGlobal
    Rewriter_number_reloadsIntegerGlobal
    Rewriter_number_rewritten_queriesIntegerGlobal
    Rewriter_reload_errorBooleanGlobal
    Rpl_semi_sync_master_clientsIntegerGlobal
    Rpl_semi_sync_master_net_avg_wait_timeIntegerGlobal
    Rpl_semi_sync_master_net_wait_timeIntegerGlobal
    Rpl_semi_sync_master_net_waitsIntegerGlobal
    Rpl_semi_sync_master_no_timesIntegerGlobal
    Rpl_semi_sync_master_no_txIntegerGlobal
    Rpl_semi_sync_master_statusBooleanGlobal
    Rpl_semi_sync_master_timefunc_failuresIntegerGlobal
    Rpl_semi_sync_master_tx_avg_wait_timeIntegerGlobal
    Rpl_semi_sync_master_tx_wait_timeIntegerGlobal
    Rpl_semi_sync_master_tx_waitsIntegerGlobal
    Rpl_semi_sync_master_wait_pos_backtraverseIntegerGlobal
    Rpl_semi_sync_master_wait_sessionsIntegerGlobal
    Rpl_semi_sync_master_yes_txIntegerGlobal
    Rpl_semi_sync_slave_statusBooleanGlobal
    Rsa_public_keyStringGlobal
    Secondary_engine_execution_countIntegerBoth
    Select_full_joinIntegerBoth
    Select_full_range_joinIntegerBoth
    Select_rangeIntegerBoth
    Select_range_checkIntegerBoth
    Select_scanIntegerBoth
    Slave_open_temp_tablesIntegerGlobal
    Slave_rows_last_search_algorithm_usedStringGlobal
    Slow_launch_threadsIntegerBoth
    Slow_queriesIntegerBoth
    Sort_merge_passesIntegerBoth
    Sort_rangeIntegerBoth
    Sort_rowsIntegerBoth
    Sort_scanIntegerBoth
    Ssl_accept_renegotiatesIntegerGlobal
    Ssl_acceptsIntegerGlobal
    Ssl_callback_cache_hitsIntegerGlobal
    Ssl_cipherStringBoth
    Ssl_cipher_listStringBoth
    Ssl_client_connectsIntegerGlobal
    Ssl_connect_renegotiatesIntegerGlobal
    Ssl_ctx_verify_depthIntegerGlobal
    Ssl_ctx_verify_modeIntegerGlobal
    Ssl_default_timeoutIntegerBoth
    Ssl_finished_acceptsIntegerGlobal
    Ssl_finished_connectsIntegerGlobal
    Ssl_server_not_afterIntegerBoth
    Ssl_server_not_beforeIntegerBoth
    Ssl_session_cache_hitsIntegerGlobal
    Ssl_session_cache_missesIntegerGlobal
    Ssl_session_cache_modeStringGlobal
    Ssl_session_cache_overflowsIntegerGlobal
    Ssl_session_cache_sizeIntegerGlobal
    Ssl_session_cache_timeoutsIntegerGlobal
    Ssl_sessions_reusedIntegerBoth
    Ssl_used_session_cache_entriesIntegerGlobal
    Ssl_verify_depthIntegerBoth
    Ssl_verify_modeIntegerBoth
    Ssl_versionStringBoth
    Table_locks_immediateIntegerGlobal
    Table_locks_waitedIntegerGlobal
    Table_open_cache_hitsIntegerBoth
    Table_open_cache_missesIntegerBoth
    Table_open_cache_overflowsIntegerBoth
    Tc_log_max_pages_usedIntegerGlobal
    Tc_log_page_sizeIntegerGlobal
    Tc_log_page_waitsIntegerGlobal
    Threads_cachedIntegerGlobal
    Threads_connectedIntegerGlobal
    Threads_createdIntegerGlobal
    Threads_runningIntegerGlobal
    UptimeIntegerGlobal
    Uptime_since_flush_statusIntegerGlobal
    validate_password_dictionary_file_last_parsedDatetimeGlobal
    validate_password_dictionary_file_words_countIntegerGlobal
    validate_password.dictionary_file_last_parsedDatetimeGlobal
    validate_password.dictionary_file_words_countIntegerGlobal

    服务器状态变量

    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_xxxhost_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_pathcaching_sha2_password_public_key_path系统变量命名的文件中的私钥和公用密钥时,该值才为非空。的值Caching_sha2_password_rsa_public_key来自后一个文件。

    • Com_xxx

      该声明计数器变量指示次,每次数量语句已被执行。每种类型的语句都有一个状态变量。例如,和计数和分别发言。和相似,但适用于使用多表语法的 nd 语句。Com_xxxxxxCom_deleteCom_updateDELETEUPDATECom_delete_multiCom_update_multiDELETEUPDATE

      即使准备好的语句参数未知或执行期间发生错误,所有变量也会增加。换句话说,它们的值对应于发出的请求数,而不是成功完成的请求数。例如,由于状态变量是为每次服务器启动而初始化的,并且不会在重新启动后持续存在,因此用于跟踪和语句的和变量通常值为零,但如果执行了or 语句但失败了,则它们可以为非零。Com_stmt_xxxCom_restartCom_shutdownRESTARTSHUTDOWNRESTARTSHUTDOWN

      该状态变量如下: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_xxxCom_stmt_prepareCom_stmt_executeCom_stmt_closePREPAREEXECUTEDEALLOCATE PREPARECom_prepare_sqlCom_execute_sqlCom_dealloc_sqlPREPAREEXECUTEDEALLOCATE 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_sizemax_heap_table_size值的最小值。如果Created_tmp_disk_tables较大,则可能需要增加tmp_table_sizemax_heap_table_size值,以减少内存中内部临时表将转换为磁盘表的可能性。

      您可以通过比较Created_tmp_disk_tablesCreated_tmp_tables变量的值,将创建的内部磁盘临时表的数量与创建的内部临时表的总数进行比较。

      另请参见“ MySQL中的内部临时表使用”。

    • Created_tmp_files

      mysqld创建了多少个临时文件。

    • Created_tmp_tables

      服务器在执行语句时创建的内部临时表的数量。

      您可以通过比较Created_tmp_disk_tablesCreated_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 TABLESFLUSH 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

      由或的设置触发的记录缓冲池中保存的页面的操作的进度。InnoDBinnodb_buffer_pool_dump_at_shutdowninnodb_buffer_pool_dump_now

      有关相关信息和示例,请参见“保存和恢复缓冲池状态”。

    • Innodb_buffer_pool_load_status

      操作进度,热身的InnoDB缓冲池由一组阅读页面对应一个较早的时间点,通过设置触发innodb_buffer_pool_load_at_startupinnodb_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

      缓冲池中脏页中保存的当前字节总数。与使用相比,为了更精确地计算内存使用量,当压缩表导致缓冲池容纳不同大小的页面时。InnoDBInnodb_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_freeInnodb_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

      由创建的撤消表空间的数量InnoDBInnoDB初始化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_PINGCOM_STATISTICS命令。

      本节开头的讨论指出了如何将该语句计数状态变量与其他此类变量相关联。

    • Questions

      服务器执行的语句数。与Queries变量不同,这仅包括客户端发送给服务器的语句,而不包括在存储的程序中执行的语句。这个变量不计COM_PINGCOM_STATISTICSCOM_STMT_PREPARECOM_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_pathsha256_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_usedTc_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语句以来的秒数。