The maximum number of connections in mysql is 100 by default, and the maximum number of connections in mysql is 100 by default. this value is far from enough for database applications with concurrent connections.
, You can increase it as appropriate,
The maximum number of connections in mysql is 100 by default. this value is far from enough for database applications with many concurrent connections.
, You can increase it as appropriate,
Whereis safe_mysqld
Find the location of safe_mysqld, edit it, find the two lines started by mysqld, and add the parameter
-O max_connections = 1000
For example
--- Safe_mysqld.orig Mon Sep 25 09:34:01 2000
++ Safe_mysqld Sun Sep 24 16:56:46 2000
@-Random, 10 + random, 10 @@
If test "$ #"-eq 0
Then
Nohup $ ledir/mysqld -- basedir = $ MY_BASEDIR_VERSION -- datadir = $ DATADIR/
--- Skip-locking> $ err_log 2> & 1
+ -- Skip-locking-O max_connections = 1000 >>$ err_log 2> & 1
Else
Nohup $ ledir/mysqld -- basedir = $ MY_BASEDIR_VERSION -- datadir = $ DATADIR/
--- Skip-locking "$ @" >>$ err_log 2> & 1
+ -- Skip-locking "$ @"-O max_connections = 1000 >>$ err_log 2> & 1
Fi
If test! -F $ pid_file # This is removed if normal shutdown
Then
Disable mysql and restart it.
/Mysqladmin path/mysqladmin-uroot-p variables
Enter the password of the root database account.
| Max_connections | 1000 |
That is, the new change has taken effect.