In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
How does mysql set the maximum number of connections? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
Generally speaking, the maximum number of connections for mysql is 100 by default, and the maximum number of connections can reach 16384. If we want to modify the maximum number of connections for mysql, how do we set it?
Method 1: modify the command line
We just need to open the console of mysql and enter the "set GLOBAL max_connections=1000;" statement to set the maximum number of connections directly, as shown in the following figure:
Note: this method does not address the root causes, and can only temporarily modify the maximum number of connections. If you restart mysql at one point, the maximum number of connections will return to the previously set value.
Method 2: modify the maximum number of connections through the mysql configuration file
1. Open the mysql installation directory on your computer and find the my.ini file, as shown in the following figure:
2. Open the my.ini file with notepad, and find and modify the value of "max_connections". The default maximum number of connections is 100, as shown in the following figure:
Set "max_connections=1000" so that you can set the maximum number of connections for mysql to 1000.
3. After setting the maximum number of connections, you need to restart the mysql service.
In [computer]-- > [Management]-- > [Services and applications]-- > [Services]-- > [MySQL]
Click mysql and right click to enable or close it, as shown in the following figure:
This sets the maximum number of mysql connections to 1000 and is permanently set.
Thank you for reading! After reading the above, do you have a general idea of how to set the maximum number of connections in mysql? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.