Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Aiheen aloitti: lesc - toukokuu 10, 2006, 08:10:29 AP

Otsikko: SMF was unable to connect to the database
Kirjoitti: lesc - toukokuu 10, 2006, 08:10:29 AP
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-
Otsikko: Re: SMF was unable to connect to the database
Kirjoitti: kegobeer - toukokuu 10, 2006, 08:15:57 AP
Verify the MySQL information in Settings.php is correct.
Otsikko: Re: SMF was unable to connect to the database
Kirjoitti: lesc - toukokuu 10, 2006, 11:02:44 AP
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.

Otsikko: Re: SMF was unable to connect to the database
Kirjoitti: 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.
Otsikko: Re: SMF was unable to connect to the database
Kirjoitti: lesc - toukokuu 11, 2006, 04:07:38 IP
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.
Otsikko: Re: SMF was unable to connect to the database
Kirjoitti: Oldiesmann - toukokuu 12, 2006, 10:47:54 AP
Have fun :)
Otsikko: Re: SMF was unable to connect to the database
Kirjoitti: Jennifer - kesäkuu 21, 2006, 04:26:35 AP
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."