MySQL default maximum connection number is 100, add the default MySQL connection number method has two
Method One: Enter the MySQL installation directory to open the MySQL profile my.ini (Windows) or MY.CNF (Linux environment) lookup max_connections=100 Modify to max_connections=1000 Re-start MySQL in the service
Method Two:
Client Login: mysql-u username-p password
Set the new maximum number of connections to 200:mysql> set GLOBAL max_connections=200
Displays the currently running query:mysql> show processlist
Show current status:mysql> show status
Exit Client:mysql> Exit
View current maximum number of connections: mysqladmin-u username-p Password variables
Maximum number of changes in C # programs:
<add key= "MYSQL" value= "Connection timeout=20;server=120.26.71.40;port=3306;userid=hbl_test;password=test; Database=mydb;persist Security Info=true;charset=utf8; Allow User variables=true "/>
Where: Allow user Variables=true allows storage variables to be used
Connection timeout=20 connection time can be 20 seconds
The number of connections is not equal to the number of threads.
SQL Server employs a worker threading model. 5,000 of the 5,000 threads are not necessarily created.
MySQL is a connecting thread, and 5,000 of them seem too big.
Maximum number of MySQL connections