Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

SMF was unable to connect to the database

Aloittaja lesc, toukokuu 10, 2006, 08:10:29 AP

« edellinen - seuraava »

lesc

After upgrading to SMF 1.0.7, I am unable to connect to my website. SMF 1.0.7 is running with MKPortal 1.0. I am able to log into phpMyAdmin through Vdeck. How can I correct the problem? Here is the message that is generated when attempting to access my website:

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

Note: The upgrade was successful.

-Les-

kegobeer

Verify the MySQL information in Settings.php is correct.
"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")

lesc

Yes, I double checked and the Settings.php is correct. Any other suggestions. -Les-

Lainaus käyttäjältä: kegobeer - toukokuu 10, 2006, 08:15:57 AP
Verify the MySQL information in Settings.php is correct.


Oldiesmann

This will give you the actual error...

index.php

Find
// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
db_fatal_error();


Replace
// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
die(mysql_error());


Once you have the error message it should be pretty easy to figure out what the problem is.
Michael Eshom
Christian Metal Fans

lesc

No need to message further. I attempted another upgrade manually but toasted my db in error. I have some explaining to do but things happen. This is a great excuse to go to Mkportal 1.1RC1 and SMF 1.1. Started the process this afternoon.  8)

Thanks again for the help. -Les-

Lainaus käyttäjältä: Oldiesmann - toukokuu 10, 2006, 01:28:23 IP
This will give you the actual error...

index.php

Find
// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
db_fatal_error();


Replace
// Show an error if the connection couldn't be made.
if (!$db_connection || !@mysql_select_db($db_name, $db_connection))
die(mysql_error());


Once you have the error message it should be pretty easy to figure out what the problem is.

Oldiesmann

Michael Eshom
Christian Metal Fans

Jennifer

I tried that and I still don't get anything, just the regular message:

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

Advertisement: