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 solve the problem that the maximum max_connections is 214in mysql

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

This article mainly introduces how to solve the problem of max_connections maximum 214in mysql, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand.

1. Check the operating system version first

Cat / proc/version

Because of different operating system versions, the path of the modified file will be different.

The system of this machine is: (Ubuntu 5.4.0-6ubuntu1~16.04.5)

2. Modify the number of connections

Cd / etc/mysql/mysql.conf.d

Vi mysqld.cnf

Add max_connections=300 under [mysqld]

3. Enter the directory / etc/systemd/system/multi-user.target.wants and find the file mysql.service

Ps: the file path of the centos7 system is as follows: / usr/lib/systemd/system/mysqld.service

4. Sudo vim mysql.service, add the following at the end of "Service":

LimitNOFILE=65535

LimitNPROC=65535

5. Execute the following command to make the changes effective:

Systemctl daemon-reload

Systemctl restart mysql.service

6. Log in to msyql to check whether max_connections and open_files_limit have been updated successfully.

Thank you for reading this article carefully. I hope the article "how to solve the problem of max_connections 214in mysql" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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