Support Forums

Database Error: Could not connect to server

This is a discussion on Database Error: Could not connect to server within the Technical Support forums, part of the Technical Support Forums category; Today, when trying to access the site front-end, I received the following error: Database Error: Could not connect to server ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 09-15-2009, 03:29 PM   #1
Junior Member
 
Join Date: Sep 2009
Posts: 4
Rep Power: 0
gsande is on a distinguished road
Default Database Error: Could not connect to server

Today, when trying to access the site front-end, I received the following error:

Database Error:
Could not connect to server

I tried to login on the administrative Control Panel, and received the same exact error message.

Last night, I installed the TemplateCodes templates, but that was all working fine, and then today, I'm not able to access the site - either front end or back end.

fyi- I did change the ftp password last night as well, and I saw in another post that may be a related cause.

Appreciate any input.
Thanks
Gary
gsande is offline  
Old 09-15-2009, 03:33 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Hi Gary,

It sounds like either the database server is down or the database connection info has changed. I would recommend opening connections/classifieds.php to get your db details, then visit your web hosts control panel and confirm they are the same.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-15-2009, 04:01 PM   #3
68 Evangelist & Developer
 
 
Join Date: Jan 2007
Location: Pennsylvania, USA
Posts: 1,936
Rep Power: 57
Mike-N-Tosh is just really nice Mike-N-Tosh is just really nice
Default

If your site was working just fine and then it's suddenly giving that error, then there are only 4 things that could cause that:
1. The mySQL server is not available
2. Your hosting service changed the settings for the mySQL server
3. You modified the connections/classifieds.php file (connection configuration file)
4. You've been hacked

Changing your ftp password should have nothing to do with that at all as it is a completely separate functionality of the hosting server and changing that password is only connected to one ftp account and ftp protocols are not used with the script.
__________________
Mike-N-Tosh
IndianaPC.org - A community website (v3.1.10 Developer - heavily modified & used as the CMS)
Sandbox [localhost(v3.1.10, v4.0.9, 4.1.10)] for development and customization
Visit My blog: reviews, tips, tricks, tutorials and my store with Templates, Mods & Docs
Web Hosting | Web Design & Development | 68 Classifieds Customizations
I am not a 68C employee, just a user and try to help out
Mike-N-Tosh is offline  
Old 09-15-2009, 04:37 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,467
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I thought the same as you Mike although some hosts do have some crazy setups. So maybe they use the same username for ftp as they do for the db username.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 09-15-2009, 09:16 PM   #5
Junior Member
 
Join Date: Sep 2009
Posts: 4
Rep Power: 0
gsande is on a distinguished road
Default

Thanks Eric and Mike,

I'm working through these options, but don't have an answer (or a fix) yet.
I appreciate your input, since I'm still a "newbie" 68 Classifieds, but I won't be (new) for long!
I'll reply back if/when I get to the bottom of this regarding the cause.
Thanks
Gary
gsande is offline  
Old 10-15-2009, 10:25 AM   #6
Junior Member
 
Join Date: Aug 2008
Posts: 10
Rep Power: 8
richartj is on a distinguished road
Default HELP!!! I think I've been hacked

I have this problem today!!

Please help!

I think I've been hacked, but it's hard to tell.

I replaced the connections folder with my backup and still get the same message. I can connect using phpmyadmin so I know the database is up and running.

Any suggestions?
richartj is offline  
Old 10-15-2009, 10:30 AM   #7
curmudgeon
 
Join Date: Mar 2006
Posts: 5,223
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by richartj
Any suggestions?
Contact your host and see if they have made any changes to the way your scripts connect to the database, for example do you still use "localhost" as the name fo the database server or did they change it? Check your permissions for your 68C database, does the username and password in your connections file actually have righst to access the database.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Old 10-15-2009, 07:38 PM   #8
Junior Member
 
Join Date: Aug 2008
Posts: 10
Rep Power: 8
richartj is on a distinguished road
Default Thank you !!!!!

Larry,

You hit the nail on the head!

Thank you so much!

I've been at my "real" job all day and just got back to this problem. I had the IP address in the connection script. When I changed it from the IP address to locahost it started working as before.

Any idea how/why this would change? The site's been up and running fine for months, then today - I had this issue.

Any idea of what I should set that to? Should I keep it set to localhost ? or do I change it to the actual domain name?

Thanks for your help,

TJ
richartj is offline  
Old 10-15-2009, 08:27 PM   #9
curmudgeon
 
Join Date: Mar 2006
Posts: 5,223
Rep Power: 128
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

Quote:
Originally Posted by richartj

I've been at my "real" job all day and just got back to this problem. I had the IP address in the connection script. When I changed it from the IP address to locahost it started working as before.

Any idea how/why this would change? The site's been up and running fine for months, then today - I had this issue.

Any idea of what I should set that to? Should I keep it set to localhost ? or do I change it to the actual domain name?

Thanks for your help,

TJ

Best bet is to ask the host what to set it to. Using an IP probably isnt a good idea, many hosts move stuff around and use DNS to make sure things go where they need to.
__________________
Larry

Knowledge learned is more valuable than knowledge given.
Lhotch is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
database error - extrapages seymourjames Technical Support 3 11-12-2008 04:49 PM


All times are GMT -4. The time now is 10:09 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0