"Error establishing a database connection" MySQL/MariaDB error

Learn how to fix "Error establishing a database connection” for MySQL/MariaDB on a Linux Server. With this guide you can easily fix the error for MySQL and MariaDB. [...]