Configuration file Path/etc/my.cnf
Core Configuration
# The MySQL server
[Mysqld]
Port = 3306 Listening ports
Socket = socket for/tmp/mysql.sock monitoring
Skip-locking Skip Lock
Key_buffer_size = 256M Index block buffer size
Max_allowed_packet = 1M Maximum allowable package
Table_open_cache = 256 Indicates the number of open tables for all threads
Sort_buffer_size = 1M sorted buffer size
Read_buffer_size = 1M Read buffer size
Read_rnd_buffer_size = 4M Random Read buffer size
Myisam_sort_buffer_size = 64M buffer size for MyISAM engine
Thread_cache_size = 8 Buffers The number of reusable threads, which are generally memory-related. 1G memory set to 8,2G memory set to 16,4G above is set to 64.
query_cache_size= buffer size for 16M queries
# Try number of CPU ' s*2 for thread_concurrency
Thread_concurrency = 8 is related to the number of CPU cores, the maximum number of concurrent threads
Interactive_timeout = 8 with the next configuration only takes effect
Wait_timeout = 8 depends on the previous value, and when the link is complete, the connection is automatically disconnected
Long_query_time = 1 Connection More than one second, automatic logging
Log_slow_queries =/data/mysql/slow.log The path of the log, used in conjunction with the previous line
#skip-grant Skip Authorization, you can log in to MySQL without a password. Commonly used to initialize passwords
3.0-mysql Configuration Detailed