In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to adjust the maximum number of connections in MYSQL. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
How to increase the maximum number of connections in MYSQL
1. Modify safe_mysqld
Find safe_mysqld and edit it, find the two lines where mysqld starts, and add parameters at the end:
-Omax_connections=1000
For example: (the content preceded by-- is the original content, while + is modified)
-safe_mysqld.origMonSep2509:34:012000
+ safe_mysqldSunSep2416:56:462000
@ @-109, 109, 109, 10, 10, 10, 10, 10, 10, 10.
Iftest "$#"-eq0
Then
Nohup$ledir/mysqld--basedir=$MY_BASEDIR_VERSION--datadir=$DATADIR
-skip-locking > > $err_log2 > & 1
+-- skip-locking-Omax_connections=1000 > > $err_log2 > & 1
Else
Nohup$ledir/mysqld--basedir=$MY_BASEDIR_VERSION--datadir=$DATADIR
-skip-locking "$@" > > $err_log2 > & 1
+-- skip-locking "$@"-Omax_connections=1000 > > $err_log2 > & 1
Fi
Iftestworthy Mushroom words piddling fileholders Thisisremovedifmovie shutdown
Then
Then close mysql and restart it, using the
/ path where mysqladmin is located / mysqladmin-uroot-pvariables
After entering the password of the root database account, you can see
| | max_connections | 1000 | |
That is, the new changes have come into effect.
How to increase the maximum number of connections in MYSQL
two。 Modify the original code
Unlock the original code of MySQL, enter the sql directory inside and modify mysqld.cc to find the following line:
{"max_connections", (long*) & max_connections,100,1,16384,0,1}
Change it to:
{"max_connections", (long*) & max_connections,1000,1,16384,0,1}
Save and exit, and then. / configure;make;makeinstall can get the same effect.
The above is how to adjust the maximum number of connections in MYSQL. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, 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.