docker mysql modify the maximum number of connections and profiles

1. Locate the mysql mirror

docker ps

Here Insert Picture Description
2 into the interior of the mirror image mysql

docker exec -it 05138413c565 /bin/bash

3. Install vim
because no internal mirror with docker vim command, it is necessary to manually install, use may be copied over the command from the CP docker host machine

apt-get update
apt-get install vim

4. Edit Profile

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

Here Insert Picture Description
Add max_connections = 1024 stored in a file exit
5. restart mirroring

docker kill 05138413c565  
docker staart 05138413c565 

6. Check whether to change the number of connections mysql

show variables like '%max_connections%';

Here Insert Picture Description
Figure has become 1024

Published 13 original articles · won praise 16 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_44190275/article/details/104550545