Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade MySQL 5.7.23 in CentOS 7

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to upgrade MySQL 5.7.23 in CentOS 7", which is easy to understand and clear. I hope it can help you solve your doubts. Let me lead you to study and learn how to upgrade MySQL 5.7.23 in CentOS 7.

Preface

Recently, a pit was found to upgrade MySQL5.7.23 under CentOS 7. Take a cluster upgraded to MySQL5.7.23 as an example.

In our environment, the parameter open_files_limit for opening the number of file descriptors is configured as 65535 under MySQL 5.6.21, while the default value of the open_files_limit parameter for installing MySQL5.7.23 on CentOS 7 is 5000.

Otherwise, like a cluster with a large number of partition tables, when the number of files opened is too large, the database will report an error.

The reasons are as follows:

1. CentOS 7 installs MySQL5.7.23, and 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] default value is 5000, LimitNOFILE should be modified 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

[conclusion]

1. When managing mysql services with systemd, when setting open_files_limit parameters in the following three configuration files at the same time, the service configuration file will prevail.

2. When the relevant configuration values of service are commented out, the global configuration file will prevail.

[solution]

1. Single repair method, follow the steps below

# modify configuration vim / usr/lib/systemd/system/mysqld.service# reload systemctl daemon-reload# restart service effective systemctl restart mysqld@replica01.service

2. Install the package repair method, modify the following two source files, increase 5000 to 65535, and repackage and release, so that the new version will maintain the same configuration as MySQL5.6.21 by default.

The above is all the contents of the article "how to upgrade MySQL 5.7.23 in CentOS 7". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report