Database connection error (2): Could not connect to MySQL.

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
avinashjto04
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Apr 13, 2015 11:55 am

Database connection error (2): Could not connect to MySQL.

Postby avinashjto04 » Mon Apr 13, 2015 1:15 pm

Hi,

Once in a while I am getting error "Database connection error (2): Could not connect to MySQL." for my Joomla site. I checked Configuration file, everything is configured perfect.
Some time site works, some time not. i am not able to figure out what's the exact problem is?
Could any one please help me to get this issue resolved.

Thanks in advance!
Avinash

User avatar
conlippert
Joomla! Explorer
Joomla! Explorer
Posts: 481
Joined: Tue Feb 27, 2007 1:53 pm
Location: Ann Arbor, Michigan
Contact:

Re: Database connection error (2): Could not connect to MySQ

Postby conlippert » Mon Apr 13, 2015 2:05 pm

I would check your server error log and see if there is any error messages before the time of the connection error. Also, when you say it sometimes works, does that mean it works for a while on the same page for example, the home page and then suddenly the connection drops? This could mean a problem with the host.

avinashjto04
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Apr 13, 2015 11:55 am

Re: Database connection error (2): Could not connect to MySQ

Postby avinashjto04 » Mon Apr 13, 2015 2:50 pm

Yes Exactly same thing is happening as you maintained in your example.I also had word with my host provider, they are saying there might be problem with Application, However from my end application is running well.so i am confused now.
Could you please help me out to get this issue solved.
Please let me know if you want any thing in this regard.

Thanks,
Avinash

User avatar
conlippert
Joomla! Explorer
Joomla! Explorer
Posts: 481
Joined: Tue Feb 27, 2007 1:53 pm
Location: Ann Arbor, Michigan
Contact:

Re: Database connection error (2): Could not connect to MySQ

Postby conlippert » Mon Apr 13, 2015 3:13 pm

Is there any messages in the error log before the connection times out? How many times has it timed out in the last week? You can also turn on the debug in the administrator and it will give you all the sql results.

avinashjto04
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Apr 13, 2015 11:55 am

Re: Database connection error (2): Could not connect to MySQ

Postby avinashjto04 » Mon Apr 13, 2015 3:38 pm

Just now i checked, after connection time out i am getting same error "Database connection error (2): Could not connect to MySQL." i can't give you exact count of how many time it timed out in a last week.
How would i turn on the debug in the administrator.
Please advise!

Thanks,
Avinash

avinashjto04
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Apr 13, 2015 11:55 am

Re: Database connection error (2): Could not connect to MySQ

Postby avinashjto04 » Mon Apr 13, 2015 3:54 pm

I turned on the debug in administrator. I am getting below error "Parsing errors in language files"
Is this the root cause of my problem?
If Yes please suggest how can i remove this error.

Thanks,
Avinash

User avatar
conlippert
Joomla! Explorer
Joomla! Explorer
Posts: 481
Joined: Tue Feb 27, 2007 1:53 pm
Location: Ann Arbor, Michigan
Contact:

Re: Database connection error (2): Could not connect to MySQ

Postby conlippert » Mon Apr 13, 2015 4:32 pm

Parsing errors sound like your template is a problem. What template are you using? Here is a post on the same problem. viewtopic.php?f=617&t=827828

avinashjto04
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Apr 13, 2015 11:55 am

Re: Database connection error (2): Could not connect to MySQ

Postby avinashjto04 » Tue Apr 14, 2015 12:52 pm

Still i am getting same error.i don't want this problem should be repeated again and again.
Is there any alternative method to remove it.
Please help.

User avatar
conlippert
Joomla! Explorer
Joomla! Explorer
Posts: 481
Joined: Tue Feb 27, 2007 1:53 pm
Location: Ann Arbor, Michigan
Contact:

Re: Database connection error (2): Could not connect to MySQ

Postby conlippert » Tue Apr 14, 2015 1:35 pm

You could try moving the site to a different server and see if you get the same thing. If you post your URL I'll look at it and see if I notice anything.

avinashjto04
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Apr 13, 2015 11:55 am

Re: Database connection error (2): Could not connect to MySQ

Postby avinashjto04 » Tue Apr 14, 2015 2:26 pm

I do have single server at that time, so i can't move to a different server.
http://bindassstudent.com/bindass-student/

User avatar
conlippert
Joomla! Explorer
Joomla! Explorer
Posts: 481
Joined: Tue Feb 27, 2007 1:53 pm
Location: Ann Arbor, Michigan
Contact:

Re: Database connection error (2): Could not connect to MySQ

Postby conlippert » Tue Apr 14, 2015 3:28 pm

Looked at all I could with out creating a login but never got the connection error. Maybe you could test on desktops and come up with some pattern of occurance. That would be the best clue as to what is causing your problem. I think the parsing error in the language files is a secondary problem so you should work on that in another post on the forum. From my experience, if an error message comes up unpredictably it's not the application. Unpredictable is usually due to a bad internet connection or some problem at the server level especially if you are on a shared server. Unless you can reproduce the problem with predictable elements, it's pretty much a guessing game.

jcms
I've been banned!
Posts: 2233
Joined: Wed Nov 19, 2014 9:23 am

Re: Database connection error (2): Could not connect to MySQ

Postby jcms » Wed Apr 15, 2015 6:58 pm

maybe your server Mysql is not good. check it first and check value of memory_limit in your server.


Return to “Joomla! 2.5 Bug Reporting”

Who is online

Users browsing this forum: No registered users and 2 guests