We all know that after the MySQL database is installed, the default MySQL database has a maximum number of connections of 100. This number of connections is far from enough for forums or websites with slightly larger traffic. There are two ways to increase the default number of MySQL connections. show variables like 'max_connections'; Method 1:Go to the MySQL installation directory, open the MySQL configuration file my.ini or my.cnf, search for max_connections=100 and change it to max_connections=1000. Restart MySQL in the service. Method 2:The default maximum number of MySQL connections is 100 client logins: MySQL -uusername -ppassword Set the new maximum number of MySQL connections to 200: MySQL> set GLOBAL max_connections=200 Display the currently running Query: MySQL> show processlist Displays the current status: MySQL> show status Exit the client: MySQL> exit View the current maximum number of MySQL connections: MySQLadmin -uusername -ppassword variables Method 3:Take the manually compiled version of MySQL 5.0.33 under centos 4.4 as an example: vi /usr/local/MySQL/bin/MySQLd_safe Find safe_MySQLd and edit it. Find the two lines that start MySQLd and add the parameters after them: -O max_connections=1500 SummarizeThis concludes this article on 3 ways to correctly modify the maximum number of connections in MySQL. For more information on how to modify the maximum number of connections in MySQL, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: A brief talk about JavaScript Sandbox
>>: Example code for implementing image adaptive container with CSS
1. Function: xargs can convert the data separated...
Table of contents Congruent and Incongruent congr...
The Meta tag is an auxiliary tag in the head area...
For evenly distributed layouts, we generally use ...
Table of contents 1. Comparison of data before an...
MySQL is a relational database management system ...
Table of contents Preface How to switch between m...
1. Modify my.cnf #The overall effect is that both...
1: Download MySql Official website download addre...
This article introduces the sample code of CSS pi...
ScreenCloud is a great little app you didn’t even...
Table of contents Preface Setting up slow query l...
Table of contents BOM (Browser Object Model) 1. W...
I am using LDAP user management implemented in Ce...
VMware version: VMware-workstation-full-16 VMware...