Common variables of MySQL database that you must know

The following are commonly used variables in MySQL databases, with 50 examples listed:

  1. max_connections - maximum number of connections
  2. character_set_server - default character set
  3. innodb_buffer_pool_size - InnoDB buffer pool size
  4. log_bin - whether to enable binary logging
  5. query_cache_type - Query cache type
  6. sql_mode - SQL execution mode
  7. innodb_file_per_table - whether to use a separate InnoDB tablespace for each table
  8. wait_timeout - idle time for client connections
  9. tmp_table_size - temporary table size limit
  10. innodb_flush_log_at_trx_commit - InnoDB log flush strategy every time a transaction is committed
  11. max_allowed_packet - Maximum allowed network packet size
  12. key_buffer_size - MyISAM index cache size
  13. innodb_log_file_size - InnoDB log file size
  14. innodb_lock_wait_timeout - InnoDB lock wait timeout
  15. innodb_thread_concurrency - InnoDB thread concurrency
  16. sync_binlog - Control the synchronization method of binlog
  17. max_heap_table_size - Maximum size of temporary table in memory
  18. thread_cache_size - Thread cache size
  19. innodb_flush_method - InnoDB method for flushing data and log files
  20. table_open_cache - cache number of open tables
  21. log_error - error log file path
  22. innodb_io_capacity - InnoDB IO capacity limit
  23. innodb_autoinc_lock_mode - InnoDB auto-increment lock mode
  24. innodb_open_files - Number of files opened by InnoDB
  25. interactive_timeout - client interaction timeout
  26. innodb_stats_on_metadata - whether to update statistics on metadata operations
  27. thread_stack - Thread stack size
  28. log_queries_not_using_indexes - Whether to log queries that do not use indexes
  29. innodb_checksum_algorithm - InnoDB data verification algorithm
  30. innodb_adaptive_hash_index_partitions - InnoDB adaptive hash index partition number
  31. innodb_use_native_aio - whether to enable native asynchronous IO
  32. innodb_fast_shutdown - Controls how quickly the InnoDB engine shuts down
  33. innodb_purge_threads - Number of InnoDB purge threads
  34. log_slow_queries - whether to log slow queries
  35. innodb_print_all_deadlocks - whether to print all deadlock information
  36. innodb_stats_persistent - Whether to persist InnoDB statistics
  37. innodb_strict_mode - whether to enable strict mode
  38. innodb_write_io_threads - InnoDB write IO thread number
  39. innodb_read_io_threads - InnoDB read IO thread number
  40. innodb_old_blocks_pct - Controls the proportion of old blocks retained in the buffer pool
  41. innodb_adaptive_max_sleep_delay - InnoDB adaptive maximum delay time
  42. innodb_undo_logs - Number of InnoDB undo logs
  43. innodb_log_buffer_size - InnoDB log buffer size
  44. innodb_flush_neighbors - Controls the flush strategy of neighboring pages
  45. innodb_thread_sleep_delay - InnoDB thread sleep delay time
  46. innodb_large_prefix - whether to enable large prefix indexes
  47. innodb_max_dirty_pages_pct - Controls the proportion of dirty pages
  48. innodb_checksums - Whether to enable InnoDB database checksums
  49. innodb_doublewrite - Whether to enable the InnoDB double-write mechanism
  50. innodb_stats_sample_pages - Number of pages sampled for InnoDB statistics

Note that these variables may vary depending on your MySQL version and system configuration. You can adjust the variable settings yourself as needed.

Guess you like

Origin blog.csdn.net/m0_55877125/article/details/132803029