This tutorial will show you how to fix some of the most common issues that Joomla users experience.
If you encounter the following error when browsing your website:
Database Error: Unable to connect to the database:Could not connect to database
You should check the configuration.php file of your Joomla application and make sure the following lines are correct
var $dbtype = ‘mysql’;
You should make sure you are using the correct MySQL username and database in your configuration.php file.
You can use the MySQL Databases tool in your cPanel in order to check the correct username and database for your Joomla.
In addition, make sure that your MySQL username is added to your database. More information on that matter can be found in our tutorial on How to create a MySQL database and user.