How to troubleshoot: Error establishing a database connection
If your website/application is alerting you that there was an error establishing database connection you should take the following steps in order to troubleshoot the issue:

Check the configuration file for errors
HiTechCloud runs each user service inside its own container and uses local networks to isolate them. This means that applications do not connect to the database via localhost or 127.0.0.1, but instead through container hostnames.
You can check the database connection parameters such as hostname and port on HiTechCloud > MySQL/Databases by hovering the container name at the top of the page:

Now compare these parameters with those inside the websites configuration file, in this example we are editing the wp-config.php file of a WordPress installation using File Manager:

Since localhost was set inside the file the connection is failing, to fix the issue we replace localhost with the correct hostname (mariadb in our case) and click save at the top right corner of the editor:

After saving this change the new configuration is applied and our WordPress instalation connects to the database successfully:

Make sure the database service (container) is running
The easiest way to make sure the database service is running is by accessing the HiTechCloud Panel > MySQL/Databases page, if your databases are listed on that page that means the container is healthy and running.
If you get a blank page or an empty table instead it means that the database container is inactive, simply accessing this page will send a trigger to start the container automatically.
However if data doesn't appear on the page in a couple of minutes there's an issue with the database container.
If the Docker feature is enabled for your plan you can check the database container's logs on HiTechCloud > Docker/Logs , you can also stop and start the container on HiTechCloud > Docker/Containers .

If the Docker feature is not enabled for your plan and data doesn't appear on the HiTechCloud Panel > MySQL/Databases page contact your server administrator so that they can check further.