Set max_connections
(This method is experimenting in Debian MySQL Ver 12.22 Distrib 4.0.22, for PC-Linux (i386)) The setting method is in the My.cnf file, add the following last red line:
[Mysqld] port = 3306 # socket = MySQL skip-locking set-variable = key_buffer = 16K set-variable = max_allowed_packet = 1M set-variable = thread_stack = 64K set-variable = table_cache = 4 set-variable = sort_buffer = 64K set- Variable = net_buffer_length = 2k set-variable = max_connections = 32000 (different Max_Connecionts = 2000 in the Dell Machine in the yard)
)
After the modification is complete, restart mysql. Of course, in order to ensure the settings are correct, you should check the max_connections. Note: 1, although 32000 written here. However, the actual Mysql server allows for maximum connections 16384; 2. In addition to max_connections, other configurations should be configured according to your system itself, do not need to be kept; 3. Add the maximum allowable connection, the system consumption is not increased. 4. If your MySQL is used by my.ini, the configuration is similar, but the format set is slightly changed.
Use mysqld --help to see the Max_Connections variable. Or after mysql -uuser -p mysql> show variables; you will also see Max_Connections.
Here is the method of modifying the redhat9 of Teacher Zhang:
First mysql -uw01f -pmysql> show variables; see max_connections is 100Mysql> exit; vi /etc/my.cnf [mysqld] set-variable = max_connections = 250 # Add to these content: WQ