Database connection error

Need help with the Administration of your Joomla! 2.5 site? This is the spot for you.

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.
abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Database connection error

Postby abccomputer » Mon May 08, 2017 8:25 pm

Database connection error (3): Could not connect to database.

The website is mppdc.com or mppdc.org org for some reason gives a Database connection error (2): Could not connect to database error as well as the admin panels.

I have reset the password in MySQL as well as in the configuration.php file. Still same error. Was working fine on Friday.

Any help would be appreciated.
Laura
Resident geek

User avatar
mjparadac
Joomla! Ace
Joomla! Ace
Posts: 1416
Joined: Mon Oct 29, 2012 3:58 pm

Re: Database connection error

Postby mjparadac » Mon May 08, 2017 9:23 pm

Hello Laura

These threads could help you.
viewtopic.php?t=819904
viewtopic.php?t=831735
viewtopic.php?t=794917

Regards,
Joomla Community Ambassador for A2 Hosting | A2 Hosting - Our speed, your success | https://www.a2hosting.com/joomla-hosting?utm_campaign=grassroots&utm_medium=forum&utm_source=joomla.org

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Mon May 08, 2017 9:53 pm

Thanks for the reply. I have checked the 4 settings

host
user
password
db

several times. and even changed the password 3 or 4 times.

This website has been up and running for several years. Not sure what changed over the weekend. I am doing a restore from a week ago to see if that fixes it. If not I have an upgrade to 3.7 planned for the site anyway will just have to make it an "emergency" upgrade.
Laura
Resident geek

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 11:53 am

My understanding is that the Database connection error (3): Could not connect to database Means that it is logging into the database but unable to attach to the schema. The correct user is assigned to the database. Would it help to create a new user account and give it access to the database? Then try the new user acccount?

I can now get into the backend of the database, but still getting the error on the front end.
Laura
Resident geek

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 26254
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Database connection error

Postby imanickam » Tue May 09, 2017 12:21 pm

Make sure that the database user is GRANTed ALL PRIVILEGES to the database used for your site.
- Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 12:24 pm

I created the new user I can connect on the backend but not the front end. The users both have all privileges.
Laura
Resident geek

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 26254
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Database connection error

Postby imanickam » Tue May 09, 2017 12:28 pm

What does it mean that you could connect on the back-end? Does it mean that the user has Super User privileges? And the same user cannot log into front-end?
- Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 12:29 pm

I can log into the administrator console on the backend of the joomla site. This makes no sense as it is using the exact same login information.
Laura
Resident geek

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 2:00 pm

Ok... I have figured out that all pages of the website work except the home page.

Example:

http://www.mppdc.org/index.php/titlevi

I have disabled all modules that only appear on the home page still no joy.
Laura
Resident geek

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 26254
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Database connection error

Postby imanickam » Tue May 09, 2017 4:25 pm

Reviewed the site and observed the following:

- When clicked on the logo, the site loads url/index.php
- When url/index.php/home is typed in the address bar of the browser, the page shows just like clicking on the logo

- When clicked on the menu item Home, the error "Database connection error (3): Could not connect to database" appears
- When clicked on the link Home in the footer menu/link, the error "Database connection error (3): Could not connect to database" appears

So, it looks like the issue is in the menu item Home.

Is this menu item defined as the Default menu item (identified by a Golden Yellow Star)?

What is the menu item type of the menu item Home?
- Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 6:11 pm

We got it fixed. It was a DNS issue with Sitelock.
Laura
Resident geek

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 8:26 pm

Though now some people are getting this message:

Duplicate entry '6f55dadc8f6dc1375dcae4606547722d' for key 'PRIMARY' SQL=INSERT INTO `jml_session` (`session_id`, `client_id`, `time`) VALUES ('6f55dadc8f6dc1375dcae4606547722d', 0, '1494357904')

I did purge the site cache. but no difference.
Laura
Resident geek

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Tue May 09, 2017 8:28 pm

The menu item type is Featured Articles. URL index.php?option=com_content&view=featured

We thought it was fixed because it does work if you press CNTL +F5 to pull new. But any reference to just mppdc.com gives the database connection error.

For the time being told people to use the mppdc.com/index.php/home. Not sure if it's a cache issue now or what.
Laura
Resident geek

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 26254
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Database connection error

Postby imanickam » Wed May 10, 2017 2:43 am

What is the relationship between the .com and .org sites? How these two domains are setup?

Are there two different sites or just one site?

If it is one site and .org being the [primary] site, the domain .com could be just forwarded to .org.
- Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
http://www.eegan.org - helping the poor and underprivileged
educate. empower. enrich.
Support the poor and underprivileged

abccomputer
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Wed Apr 30, 2008 2:46 am

Re: Database connection error

Postby abccomputer » Wed May 10, 2017 1:35 pm

There are two domains pointing to the same place. I'm going to be using the .org for testing the 3.7 upgrade so it is going to be moved this weekend. I'm not really worried about it at this point. I'll fix the DNS records when I move it.
Laura
Resident geek


Return to “Administration Joomla! 2.5”

Who is online

Users browsing this forum: No registered users and 4 guests