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)05/31 Report--
In this issue, the editor will bring you the default number of connections about how to modify MySQL 5.0in Linux. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
The manual compiled version of mysql 5.0.33 is taken as an example:
Vi / usr/local/mysql/bin/mysqld_safe
Find safe_mysqld and edit it, find the two lines where mysqld starts, and add parameters at the end:
-O max_connections=1500
Specifically, it is the following location:
To specify in the scarlet letter:
Then $NOHUP_NICENESS $ledir/$MYSQLD
$defaults-basedir=$MY_BASEDIR_VERSION
-- datadir=$DATADIR $USER_OPTION
-- pid-file=$pid_file
-- skip-external-locking
-O max_connections=1500
> > $err_log 2 > & 1 else
Eval "$NOHUP_NICENESS $ledir/$MYSQLD
$defaults-basedir=$MY_BASEDIR_VERSION
-- datadir=$DATADIR $USER_OPTION
-- pid-file=$pid_file
-- skip-external-locking $args
-O max_connections=1500 > >
$err_log 2 > & 1 "
Save.
# service mysqld restart
# / usr/local/mysql/bin/mysqladmin-uroot-p variables
After entering the password of the root account, you can see
Max_connections 1500 means that the new changes have come into effect.
There is another way:
Modify the original code:
Unlock the original code of MySQL, enter the sql directory inside and modify d.cc to find the following line:
{"max_connections", OPT_MAX_CONNECTIONS
"The number of simultaneous clients allowed." (gptr*) & max_connections
(gptr*) & max_connections, 0, GET_ULONG, REQUIRED_ARG, 100,1, 16384, 0,1
0}
Change it to:
{"max_connections", OPT_MAX_CONNECTIONS
"The number of simultaneous clients allowed." (gptr*) & max_connections
(gptr*) & max_connections, 0, GET_ULONG, REQUIRED_ARG, 1500, 1, 16384, 0, 1
0}
Save and exit, and then. / configure; make;make install can get the same effect.
The above is how to modify the default number of connections in Linux shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, 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.