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
Use tail
to see if the file code has been increased
tail /etc/mysql/my.cnf
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
Complete MySQL startup