The following article describes how to modify the maximum number of connections of MySQL. We all know that the default value of the maximum number of connections of MySQL is 100, this value is far from enough for applications that concurrently connect to many databases. When the connection request exceeds the default number of connections, the database cannot be connected, so we need to increase it.
The adjustment method is as follows:
1. in linux Server: change the value in my. cnf.
2. Windows server I used ):
Find the [MySQLd] segment in the file "my. ini" and add a line to it.
Max_connections = 200 ### 200 can be changed to the value you want to set.
Then restart the MySQL service.
/MySQLadmin path/MySQLadmin-uroot-p variables
Enter the password of the root database account.
| Max_connections | 1000 |
Other notes:
During programming, a temporary variable is made before each statement is executed to open the database when you use a MySQL statement to call the database, remember to close the MySQL temporary variable after each call.
Else... 100. txt. When necessary, analyze the data in all text files and import the data to the database.
The above content describes how to modify the maximum number of connections of MySQL. I hope you will get some benefits.