Preface Recently, I found a pitfall in upgrading MySQL 5.7.23 under CentOS 7. Take a cluster upgraded to MySQL 5.7.23 as an example. In our environment, the parameter open_files_limit for the number of open file descriptors is uniformly configured to 65535 in MySQL 5.6.21, while the default value of the open_files_limit parameter installed in MySQL 5.7.23 on CentOS 7 is 5000 Otherwise, in a cluster with a large number of partition tables, if the number of open files is too large, the database will report an error. Here are the reasons: 1. CentOS 7 installs MySQL 5.7.23, and the service management has changed from sysvinit (service mysql start) to systemd (systemctl start mysqld.service) 2. The configuration of Limit under CentOS 7 is determined by the following configuration file Global settings: /etc/systemd/system.conf (such as DefaultLimitNOFILE=65535) Service settings: [Service] The default value is 5000, and LimitNOFILE should be changed to 65535 【test】 1. Global configuration file /etc/systemd/system.conf 2. Service configuration file /usr/lib/systemd/system/mysqld.service 3. MySQL configuration file /etc/my.cnf 【in conclusion】 1. When managing MySQL service with systemd, when setting the open_files_limit parameter in the following three configuration files at the same time, the service configuration file will prevail in the end 2. When the service-related configuration value is commented out, the global configuration file will prevail. 【Solution】 1. Single unit repair method, follow the steps below #Modify configuration vim /usr/lib/systemd/system/mysqld.service #Reload systemctl daemon-reload #Restart the service to take effect systemctl restart [email protected] 2. Installation package repair method: modify the following two source files, increase 5000 to 65535, repackage and release, so that the new version will keep the same configuration as MySQL5.6.21 by default Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM. You may also be interested in:
|
<<: Detailed tutorial on deploying apollo with docker
>>: Implementation of the function of the vue circular percentage progress bar component
1. Environmental Preparation 1.MySQL installation...
The Docker Hub we used earlier is provided by Doc...
Table of contents 1. VueRouter 1. Description 2. ...
Table of contents Rendering API changes Render fu...
1. Clustered Index Table data is stored in the or...
Recently, I have been working on several virtual ...
1. Check the firewall status Check the firewall s...
This article uses the crontab command in the Linu...
0. Preliminary preparation Disable secure boot in...
How can I hide the scrollbars while still being a...
This article uses an example to describe how to r...
Table of contents 1. Array.at() 2. Array.copyWith...
MongoDB installation process and problem records ...
Table of contents Question: Case (1) fork before ...
Recently I saw an article on a public account tha...