The error is generally describing that a “front end” application which can be a website (not the web server like Apache but the code which can be html, php, something else running in a defined “virtual web server instance” connects to a database server containing data. Or, the frontend can also be something other than a website.
So, you have to start off with what your “front end” application is… Is it webmin? Is it a personal website of some kind?
Once you have declared what your website or other application (It might not be a website) is, <then> you can start to understand and know what kind of database to connect to (MySQL/Mariadb? SQLite? PostgreSQL? Mongodb? Couchdb? something else?
Also, if the frontend is a website, then you may need to know if its settings are all pre-configured by a packed install or if you need to edit any configuration files. The way the application connects to the database might be directly with built in code or may involve a special module or plugin, or even an application. So, if not pre-packaged you need to <understand the requirements how to install the application correctly.
Then you should know that if the frontend application is pre-configured, it will make certain assumptions how the database is configured so that the two can talk to each other so like the frontend application you may also be expected to make configuration settings to the database/database server.
And then lastly (or can be a moon shot “try” before everything else), all parts of you application frontend, possible connectors and the database server have to be active and running. If anything was just installed, the default is always that it’s stopped and not set to start on its own in any way. Generally, you will always be required to manually start each component and optionally modify startup parameters (eg start on boot).
So, as you might realize by now there are many reasons for creating the error
error:** Error establishing a database connection**
You just need to start by knowing what is expected for you installation (Any Guidelines? Documentation? README or INSTALL files?) and then doing what is necessary. If you have trouble doing this on your own, then post a full description
- Front Application and where it came from
- Database Server and where it’s installed from
- If you are following any Guides or Documentation, post a link