MySQL [Error] MySQL establishment of connection

created at 07-06-2021 views: 1


What should I do when MySQL reports an error [Error] MySQL establishment of connection, message from server Too many connection?

Too many connections, too many login users, and the number of configured MySQL connections is too small, or some connections are not closed, resulting in too many connections.

vim /etc/mysql/my.cnf

add code:

max_connections = 2000

edit my.cnf file of mysql

Use tail to see if the file code has been increased

tail /etc/mysql/my.cnf

tail log

Restart the MySQL container and check whether MySQL started successfully

docker ps
// Check whether MySQL is started
docker stop mysql
// stop MySQL
docker ps
// check if it stops
docker start mysql
// restart MySQL
docker ps -a
// check if it is started

successfully restarted mysql

Complete MySQL startup

Complete MySQL startup

created at:07-06-2021
edited at: 07-06-2021: