When connecting to the mysql database built on the Virtual Machines, sometimes 1040 error will be reported, indicating too many connections as shown
In this case, you need to modify the /etc/my.cnf file, and add or modify max_connections=N entry in [mysqld]. The default value is 100, which can be adjusted as needed, as shown in figure
After modification, wq saves the file, restarts the mysql database, to verify whether it takes effect.