Modify the maximum number of mysql connections and configuration files in docker

Modify the maximum number of mysql connections and configuration files in docker

1. Find the mysql image

docker ps 

insert image description here

2. Enter the mirror mysql image

docker exec -it 05138413c565 /bin/bash

3. Install vim

Because the docker image does not have a vim command, you need to install it manually, or you can use the docker cp command to copy it from the host machine.

apt-get update
apt-get install vim

4. Edit the configuration file

vim /etc/mysql/mysql.conf.d/mysqld.cnf 

insert image description here

Add max_connections=1024 to the file and save and exit

5. Restart the image

docker kill 05138413c565 
docker start 05138413c565

6. Check whether the number of MySQL connections has changed

show variables like '%max_connections%'; 

insert image description here

As shown in the figure, it has become 1024

This is the end of this article about modifying the maximum number of MySQL connections and the implementation of the configuration file in Docker. For more information about modifying the maximum number of MySQL connections in Docker, 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:
  • Tutorial on integrating MySQL with springboot's yml configuration file through db2
  • IDEA uses properties configuration file to connect to MySQL database
  • How to find the my.ini configuration file in MySQL 5.6 under Windows
  • How to modify the mysql configuration file under docker
  • How to configure the My.ini file when installing MySQL5.6.17 database
  • MySql 5.7.20 installation and configuration of data and my.ini files
  • Mysql file configuration analysis

<<:  CSS syntax for table borders

>>:  Detailed explanation of the production principle of jQuery breathing carousel

Recommend

Implementation of multiple instances of tomcat on a single machine

1. Introduction First of all, we need to answer a...

Node.js+express message board function implementation example

Table of contents Message Board Required librarie...

MySQL briefly understands how "order by" works

For sorting, order by is a keyword we use very fr...

Three ways to communicate between Docker containers

We all know that Docker containers are isolated f...

MySQL Installer 8.0.21 installation tutorial with pictures and text

1. Reason I just needed to reinstall MySQL on a n...

Implementation of MySQL Multi-version Concurrency Control MVCC

Table of contents What is MVCC MVCC Implementatio...

Vue installation and use

Table of contents 1. Vue installation Method 1: C...

Standard summary for analyzing the performance of a SQL statement

This article will introduce how to use explain to...

What are the image file formats and how to choose

1. Which three formats? They are: gif, jpg, and pn...

How to backup MySQL regularly and upload it to Qiniu

In most application scenarios, we need to back up...

Docker beginners' first exploration of common commands practice records

Before officially using Docker, let's first f...

MySQL database SELECT query expression analysis

A large part of data management is searching, and...

uniapp project optimization methods and suggestions

Table of contents 1. Encapsulate complex page dat...

Solution to MySql service disappearance for unknown reasons

Solution to MySql service disappearance for unkno...