Summary of tips for setting the maximum number of connections in MySQL

Summary of tips for setting the maximum number of connections in MySQL

Method 1: Command line modification

We only need to open the MySQL console and enter the "set GLOBAL max_connections=1000;" statement to directly set the maximum number of connections, as shown in the following figure:

Note: This method is only a temporary solution and can only temporarily modify the maximum number of connections. If you restart MySQL, the maximum number of connections will return to the original setting.

Method 2: Modify the maximum number of connections through the MySQL configuration file

1. Open the MySQL installation directory on the computer and find the my.ini file, as shown in the following figure:

2. Open the my.ini file with Notepad, find and modify the value of "max_connections". The default maximum number of connections is 100, as shown in the following figure:

Set "max_connections=1000" to set the maximum number of MySQL connections to 1000.

3. After setting the maximum number of connections, you need to restart the MySQL service

In [Computer]-->[Management]-->[Services and Applications]-->[Services]-->[MySQL]

Click mysql and right-click to start or shut down, as shown in the following figure:

This sets the maximum number of MySQL connections to 1000, and it is a permanent setting.

You may also be interested in:
  • Summarize two ways to modify the maximum number of connections in MySQL
  • Share 3 methods to modify the maximum number of MYSQL connections
  • How to increase the maximum number of connections in mysql
  • Mysql view the maximum number of connections and modify the maximum number of connections
  • 3 ways to correctly modify the maximum number of connections in MySQL
  • How to set the maximum number of connections in MySQL

<<:  How to prevent hyperlink redirection using JavaScript (multiple ways of writing)

>>:  Detailed explanation of building Nginx website server based on centos7 (including configuration of virtual web host)

Recommend

MySQL InnoDB monitoring (system layer, database layer)

MySQL InnoDB monitoring (system layer, database l...

CentOS 6.5 installation mysql5.7 tutorial

1. New Features MySQL 5.7 is an exciting mileston...

MySQL transaction, isolation level and lock usage example analysis

This article uses examples to describe MySQL tran...

How to Clear Disk Space on CentOS 6 or CentOS 7

Following are the quick commands to clear disk sp...

MySQL trigger principle and usage example analysis

This article uses examples to explain the princip...

Detailed explanation of mysql execution plan id is empty (UNION keyword)

Introduction During the work process, slow querie...

Detailed explanation of non-parent-child component communication in Vue3

Table of contents First method App.vue Home.vue H...

Detailed explanation of the loop form item example in Vue

Sometimes we may encounter such a requirement, th...

SQL left join and right join principle and example analysis

There are two tables, and the records in table A ...

Echarts implements switching different X-axes in one graph (example code)

Rendering If you want to achieve the effect shown...

Several principles for website product design reference

The following analysis is about product design pr...

Detailed explanation of MySQL redo log (redo log) and rollback log (undo logo)

Preface: The previous article described several c...

Several practical scenarios for implementing the replace function in MySQL

REPLACE Syntax REPLACE(String,from_str,to_str) Th...