Database Error: Unable to connect to the database:Could not connect to MySQL

Status
Not open for further replies.

dfleetwood

New Member
Messages
20
Reaction score
0
Points
0
Dear Support,

When trying to access http://www.strensallcubs.net I get the below error;

Database Error: Unable to connect to the database:Could not connect to MySQL

I use Joomla CMS which MYSQL is set to localhost.

Please can you advise?

Thanks,
Dan Fleetwood
 

descalzo

Grim Squeaker
Community Support
Messages
9,372
Reaction score
326
Points
83
Open configuration.php and make sure the DB part looks like:

Code:
var $host = 'localhost';
var $user = 'username_joomla';
var $password = 'yourpassword';
var $db = 'username_joomla';

The db should be correct, since Joomla gives a slightly different error message when that is wrong.

If the $host is 'localhost', there might be a problem with the username or password.

What I would try:

Open mySQL Databases from cPanel , delete the user and then add the user back with the same password (if you change the password, remember to go back and change configuration.php) Make sure you add him to the Joomla DB and give him all permissions.

See if that solves the problem.
 

dfleetwood

New Member
Messages
20
Reaction score
0
Points
0
Fixed thank you guys!

Just needed to change to localhost in the config file.

Thanks,
Dan
 

Anna

I am just me
Staff member
Messages
11,783
Reaction score
595
Points
113
Since you have gotten the answer you needed I'll close this thread.

*closed*
 
Status
Not open for further replies.
Top