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