FAQ: Mysql error – Too many connections

Error_too-many-connections

This is not a frequent error but can arise in situations if the number of mysql connections exceeds the Mysql max_connections configuration value.

To quote from MySQL site,

If you get a Too many connections error when you try to connect to the mysqld server, this means that all available connections are in use by other clients.

I also faced this situation and tried several solution but to no avail. Finally what worked was the command mentioned below.

 

Try this only if nothing else works.

FAQ: Mysql import and export database from command line

mysql-logo

Import a Mysql file to a database

Hit enter after entering above command in your terminal. You will be asked for MySql password. Note that mentioned database must be already available in mysql.

Export a Mysql database to sql file

To export your mysql database to a sql file use the following command:

Hit enter and a sql file will be generated for you.