Configuration of MySQLServer core parameters in the production environment _ MySQL

Source: Internet
Author: User
Configuration of core MySQLServer parameters in the production environment bitsCN.com

Configuration of MySQL Server Core parameters in the production environment

(1) lower_case_table_names

● Recommendation reason

The GNU/Linux platform is case sensitive to names of databases, tables, stored procedures, and other objects.

To reduce developer development costs, we recommend that you set this parameter so that all object names are automatically converted to lowercase letters.

● Parameter introduction

Value range:

0: Case Sensitive, default value for Linux

1: case insensitive

In the configuration file (/etc/my. cnf) of MySQL installed in Linux, there is no lower_case_table_names = 1 line.

In the MySQL configuration file (my. ini) installed in Windows, there is a line of lower_case_table_names = 1.

So, please note that, in the Replication configuration, the Master and Slave parameters should be consistent !!

(2) max_connect_errors

● Recommendation reason

A physical server can no longer connect to the mysqld service as long as it connects to the MySQL database server for more than 10 abnormal interruptions

Therefore, we recommend that you set this value to at least 10.

Solution 2:

Either restart mysqld or mysqladmin flush-hosts

● Parameter introduction

However, this parameter is related to security,

Some hackers may attempt to crack the password brute force. if this value has been set before the conference

(3) interactive_timeout and wait_timeout

● Recommendation reason

If your MySQL Server has a large number of idle connections, they will not only consume the memory in vain, but also if the connections continue to accumulate

In the end, the maximum number of connections to the MySQL Server will be reached, which will result in an error of 'too has connections '.

Recommended value:

Inactive_timeout = 172800

Wait_timeout = 172800

● Parameter introduction

Interactive_timeout

Parameter description: the number of seconds the server will wait to close the interactive connection.

Wait_timeout

Parameter description: the number of seconds that the server waits for to close a non-interactive connection.

(4) transaction-isolation and binlog-format

Recommended configuration

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.