3.0-mysql Configuration Detailed

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.