Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14625 reviews 1734 hosting providers

Questions & Answers

Joomla error ' Database Error: Unable to connect to the database:Could not connect to database’

Apr 4, 2012 by redBee
hi all,

When browsing my website I get the error, ‘Database Error: Unable to connect to the database:Could not connect to database’, noting that I use Joomla. can anyone help me fix this plz

thanks

3 Answers

0 votes
Apr 4, 2012 by expert
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_jo151';
var $password = 'YourPassword';
var $db = 'user_jo151';
var $dbprefix = 'jos_';
0 votes
Apr 4, 2012 by dona
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.
0 votes
Apr 4, 2012 by mike231
hi

This issue can also be caused by errors within the database itself. In such cases you can try restoring your Joomla database.