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

What is jQuery used for? jQuery is actually a js framework

Introduction to jQuery The jQuery library can be ...

Two ways to build a private GitLab using Docker

The first method: docker installation 1. Pull the...

Vue project @change multiple parameters to pass multiple events

First, there is only one change event. changeleve...

Knowledge about MySQL Memory storage engine

Knowledge points about Memory storage engine The ...

Detailed explanation of the minimum width value of inline-block in CSS

Preface Recently, I have been taking some time in...

In-depth explanation of iterators in ECMAScript

Table of contents Preface Earlier iterations Iter...

jQuery implements article collapse and expansion functions

This article example shares the specific code of ...

How to operate MySql database with gorm

1. Setting case sensitivity of fields in the tabl...

Solution to the problem that order by is not effective in MySQL subquery

By chance, I discovered that a SQL statement prod...

Detailed explanation of error handling examples in MySQL stored procedures

This article uses an example to describe the erro...

Detailed explanation of BOM and DOM in JavaScript

Table of contents BOM (Browser Object Model) 1. W...

centos7.2 offline installation mysql5.7.18.tar.gz

Because of network isolation, MySQL cannot be ins...