Optimization Configuration of my. cnf parameters in MySQL5.5 (1/3)

Source: Internet
Author: User
Tags dell r710

On the mysql server, my. i'm not talking about the importance of cnf files. Let's take a look at my. the cnf file's parameter configuration for different machines is reasonable. I hope the article will help you.

PS: This configuration file is designed for Dell R710, dual Xeon E5620, and 16 GB memory hardware. CentOS 5.6 64-bit system, MySQL 5.5.x stable version. Applicable to websites with daily IP addresses of 50-100 w and PV of-w, mainly using the InnoDB Storage engine. For other application environments, Set Optimization Based on actual conditions.

# The following options will be read by the MySQL client application.
# Note that only client applications attached to MySQL can read this section.
# If you want your MySQL application to obtain these values.
# You need to specify these options when initializing the MySQL client database.

#
[Client]
# Password = [your_password]
Port = @ MYSQL_TCP_PORT @
Socket = @ MYSQL_UNIX_ADDR @

# *** Application customization options ***

#
# MySQL Server
#
[Mysqld]

# General configuration options
Port = @ MYSQL_TCP_PORT @
Socket = @ MYSQL_UNIX_ADDR @

# Back_log is the number of connections that the operating system can maintain in the listening queue,
# The queue stores the connection before the MySQL Connection Manager thread processes it.
# If you have a very high connection rate and an "connection refused" error occurs,
# You should add the value here.
# Check your operating system documentation to obtain the maximum value of this variable.
# If you set back_log to a value higher than your operating system limit, it will be ineffective
Back_log = 300

# Do not listen on the TCP/IP Port.
# If all processes are connected to the local mysqld on the same server,
# This setting will enhance security.
# All mysqld connections are performed through Unix sockets or named pipes.
# Note: In windows, if you do not enable the named pipe option, you only use this option.
# (Using the "enable-named-pipe" option) will cause the mysql service to have no effect!
# Skip-networking

# Maximum number of concurrent sessions allowed by the MySQL Service
# One of the connections will be retained as Administrator Logon by the SUPER permission.
# Even if the maximum number of connections has been reached.
Max_connections = 3000
# Maximum number of errors allowed for each client connection. If this limit is reached.
# This client will be blocked by the MySQL service until "flush hosts" is executed or the service is restarted.
# This value is added for invalid passwords and other Link errors.
# View the status of "Aborted_connects" to obtain the Global Counter.
Max_connect_errors = 30

# Number of tables opened by all threads.
# Adding this value increases the number of file descriptors required by mysqld.
# In this case, you need to confirm that the "open-files-limit" variable in [mysqld_safe] allows at least 4096 files to be opened.
Table_cache = 4096

# Allow external file-level locks. Opening a file lock will negatively affect the performance.
# This option is used only when you run multiple database instances on the same file (note that there are still other constraints !)
# Alternatively, you can use other software dependencies on the file layer to lock the MyISAM table.
# External-locking

# The maximum size of the request packet that the service can process and the maximum size of the request that the service can process (required when working with a large BLOB field)
# Independent size of each connection. The size increases dynamically
Max_allowed_packet = 32 M

# In a transaction, binlog records the cache size of the SQL state.
# If you often use large, multi-statement transactions, you can add this value to obtain greater performance.
# All the statuses from the transaction will be buffered in the binlog buffer and then written to the binlog at one time after submission
# If the transaction is larger than this value, it will be replaced by a temporary file on the disk.
# This buffer is created when the transaction status of each connection is updated for the first time.
Binlog_cache_size = 4 M

# Maximum capacity allowed by an independent memory table.
# To prevent accidental creation of a large memory table, this option will permanently occupy all memory resources. 1 2 3

Related Article

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.