Wednesday, 25 December 2013 14:21

Solution "Database Error: Unable to connect to the database:Could not connect to database"

Written by 
Rate this item
(0 votes)
While accessing your joomla site it occurs Database Error: Unable to connect to the database: Could not connect to database, the solution is simple...Check the following steps
You should check the configuration.php file of your Joomla application and make sure the following lines are correct:

var $dbtype = 'mysql';
var $host = 'localhost';
var $user = 'user_YourUsername';
var $password = 'YourPassword';
var $db = 'user_YourUsername';
var $dbprefix = 'sak_'; (dbprefix its the variable name auto declared or you will be declaring at the time of Joomla installation on your server)

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.

Also, make sure that your MySQL username is added to your database.

This issue can also be caused by errors within the database itself. During that time you can try restoring your Joomla database.

A Simple tip from
Ultimatecine.com
Read 2659 times Last modified on Wednesday, 25 December 2013 14:38
sreeram

Email This email address is being protected from spambots. You need JavaScript enabled to view it.

Latest discussions

  • No posts to display.