Advertisement

Database Connection Error

Need help installing Joomla! 5.x? For all Joomla! 5.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
mePEI
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Sep 14, 2022 5:17 am

Database Connection Error

Post by mePEI » Thu May 16, 2024 7:24 am

I'm getting a "Could Not Connect to database error."

I have checked all the settings (and yes a DB has been created and a user to give access to the DB), and they are all correct.

Any suggestions?
JOOMLA.png
You do not have the required permissions to view the files attached to this post.

Advertisement
User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10254
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Database Connection Error

Post by AMurray » Thu May 16, 2024 9:19 am

Did you give that user all relevant permissions for the database?

The error is coming from MySQL not from Joomla, so something is amiss when you created the DB and user for that DB.

It could be something as simple as when you typed in your password to create it (in the database manager e.g. in cPanel of your hosting account) you had your caps lock on, and then when entering the password in the Joomla install screen, your caps lock is off, so now, your password doesn't match due to the mismatched case lettering.

Example:P
"AseCURePassword" is not the same as "aSEcurEpASSWORD" (on linux type servers).

Check again, the database user password, and make sure that matches in the configuration screen or the installer database details.
Regards - A Murray
General Support Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44644
Joined: Sat Apr 05, 2008 9:58 pm

Re: Database Connection Error

Post by Webdongle » Thu May 16, 2024 10:07 am

Often copy/paste a password will contain hidden password. Also check the hostname it might not be localhost.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

AndrewSmith
Joomla! Intern
Joomla! Intern
Posts: 55
Joined: Fri Apr 21, 2006 1:21 pm

Re: Database Connection Error

Post by AndrewSmith » Mon May 20, 2024 4:04 am

I've previously had this sort of thing and discovered that I had the username and password (swapped around) in the wrong fields. It's annoying/embarrassing but that's my story. I'm just thankful it doesn't happen too often.

Advertisement

Post Reply

Return to “Installation Joomla! 5.x”