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

Dockerfile text file usage example analysis

Dockerfile is a text file used to build an image....

MySQL data duplicate checking and deduplication implementation statements

There is a table user, and the fields are id, nic...

react-beautiful-dnd implements component drag and drop function

Table of contents 1. Installation 2.APi 3. react-...

Example of downloading files with vue+django

Table of contents 1. Overview 2. Django Project 3...

Avoiding Problems Caused by Closures in JavaScript

About let to avoid problems caused by closure Use...

Analysis of MySQL Aborted connection warning log

Preface: Sometimes, the session connected to MySQ...

Windows system mysql5.7.18 installation graphic tutorial

MySQL installation tutorial for Windows system do...

How to understand Vue's simple state management store mode

Table of contents Overview 1. Define store.js 2. ...

How to make CSS child elements highly consistent with parent elements

Absolute positioning method: (1) Set the parent e...

MYSQL master-slave replication knowledge points summary

An optimization solution when a single MYSQL serv...

IIS configuration of win server 2019 server and simple publishing of website

1. First remotely connect to the server 2. Open S...

Our thoughts on the UI engineer career

I have been depressed for a long time, why? Some t...

Detailed installation tutorial of mysql-8.0.11-winx64.zip

Download the zip installation package: Download a...