2.6.1.3.3. Error connecting to database
If an error occurs when connecting to a database, first check that the connection data (host, database name, database username and password) are correct. You can find out the current data of access to the database by instructions.
If the data is correct, but there is still no access, the reason may be the exhaustion of the database connection limit. As a rule, in such situations, access to the database periodically appears and disappears. To correct the situation, you need to find out the possible reasons why a large number of connections to the database may be created and eliminate them.
If you manage to connect to the database, you can view the list of current connections and forcibly terminate unnecessary processes. This can be done, for example, using phpMyAdmin or HeidiSQL.