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
Adding indexes can improve query efficiency. Addi...
Preface smb is the name of a protocol that can be...
Good morning everyone, I haven’t updated my artic...
HTML beginners often encounter the problem of how ...
1. Introduction to nmon Nmon (Nigel's Monitor...
1. Download address: http://dev.mysql.com/downloa...
count(*) accomplish 1. MyISAM: Stores the total n...
Preface Fix the footer area at the bottom. No mat...
The relationship between Javascript and DOM is ve...
Table of contents Preface interface type Appendix...
version: centos==7.2 jdk==1.8 confluence==6.15.4 ...
Last time, a very studious fan asked if it was po...
This article shares the specific code of JavaScri...
Table of contents Preface Why does limit deep pag...
Environment: init_worker_by_lua, set_by_lua, rewr...