Error: Sorry, SMF was unable to connect to the database. This may be caused

Started by zunescene, September 20, 2006, 08:51:30 AM

Previous topic - Next topic

zunescene

Not sure what happened.  I woke up this morning and all I can see is this message:

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later


I didn't change any settings, what can I do to fix it?
Zunescene.com  [Admin] [Editor] [Zune Owner]
Zune 2

kwer83

If you have root access I'd recommend restarting MySQL, should work somehow like /etc/init.d/mysql restart

kegobeer

Quote from: kwer83 on September 20, 2006, 09:29:21 AM
If you have root access I'd recommend restarting MySQL, should work somehow like /etc/init.d/mysql restart

Nah.  Check your Settings.php file and make sure it's not corrupted and/or missing your MySQL database information.  If it is, replace that file with Settings_bak.php.

After it's working again, change the permissions on Settings.php and remove the write access.  That will prevent your file from getting corrupted again.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Kartibok

Just to add that this was a great fix for my problem.

I did a hosting password change that also affected the forum, so now I also know not to have the same passwords!

Cheers

K
;)


Mouthrax

Quote from: kegobeer on September 20, 2006, 11:12:07 AM
Quote from: kwer83 on September 20, 2006, 09:29:21 AM
If you have root access I'd recommend restarting MySQL, should work somehow like /etc/init.d/mysql restart

Nah.  Check your Settings.php file and make sure it's not corrupted and/or missing your MySQL database information.  If it is, replace that file with Settings_bak.php.

After it's working again, change the permissions on Settings.php and remove the write access.  That will prevent your file from getting corrupted again.

Hi could you just explain this again but in a little more detail please as I have the same problem

1. what do I check my settings.php against?
2. How do I replace the file with settings_bak.php? rename it and copy over the settings.php?
3. what level CHMOD should I set please?

Thanks

greyknight17

1. Look in the database info area and verify that all the information there is correct.

2. Yes. You can rename the original Settings.php to something like Settings.php.OLD if you want and then rename Settings_bak.php to Settings.php

3. You may set Settings.php to 644

Mouthrax

Just to let people know that it was nothing to do with any settings what ever, I tried everything but no good, in the end it was as simple as my host giving me an IP address for my host name instead of the URL

greyknight17

You probably just got a new domain/host and the DNS settings didn't go through yet. That's why you can't enter the URL yet ;)

Advertisement: