Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: pulp999 on February 28, 2019, 10:47:34 PM

Title: SMF connection error
Post by: pulp999 on February 28, 2019, 10:47:34 PM
Hi, I'm getting this message:

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

I uploaded repair_settings.php and when I run it it says value not found next to database...recommended setting MYSQL

Do I need to set MySQL somewhere?
Title: Re: SMF connection error
Post by: vbgamer45 on February 28, 2019, 10:54:42 PM
Yes, check your settings_bak.php file might have the old information in there.
Title: Re: SMF connection error
Post by: pulp999 on February 28, 2019, 11:00:34 PM
I tried that....exactly the same result
Title: Re: SMF connection error
Post by: pulp999 on February 28, 2019, 11:12:16 PM
I attached my screenprint from repair_settings.php
Title: Re: SMF connection error
Post by: Sir Osis of Liver on March 01, 2019, 12:17:04 AM
The mysql error doesn't necessarily mean anything, it's often displayed by repair_settings when there's no problem.  Check your database settings in cpanel, your host may have changed something.
Title: Re: SMF connection error
Post by: Aleksi "Lex" Kilpinen on March 01, 2019, 12:40:05 AM
Well, no - if you see that error there is a problem.
You are right though, that the problem may be on the hosts side.

You can also try uploading a settings.php file from the installer package, and running repair_settings twice. First to correct all the DB settings, then to correct all the rest of the settings as needed.
Title: Re: SMF connection error
Post by: Doug Heffernan on March 01, 2019, 01:34:10 AM
Quote from: pulp999 on February 28, 2019, 10:47:34 PM
Hi, I'm getting this message:

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

I uploaded repair_settings.php and when I run it it says value not found next to database...recommended setting MYSQL

Do I need to set MySQL somewhere?

This error usually occurs when the database details are not entered correctly at the settings.php file. Double check them to make sure that they contain the correct details. If that is the case, then contact your host. It might be that either they are doing some maintenance work in their servers.

Title: Re: SMF connection error
Post by: Sir Osis of Liver on March 01, 2019, 11:57:17 AM
Quote from: Aleksi "Lex" Kilpinen on March 01, 2019, 12:40:05 AM
Well, no - if you see that error there is a problem.

repair_settings reports the error often on many of the servers I've worked on, sometimes it's the problem, usually it's not.  Something else triggers the error (don't know what), once everything else is fixed error clears.

Title: Re: SMF connection error
Post by: Aleksi "Lex" Kilpinen on March 01, 2019, 11:59:48 AM
I can understand that, though I haven't encountered that myself - but this was basically what that was aimed at.
Quote from: Sir Osis of Liver on March 01, 2019, 12:17:04 AM
it's often displayed by repair_settings when there's no problem. 
May be I misunderstood what you meant to say.
Title: Re: SMF connection error
Post by: Sir Osis of Liver on March 01, 2019, 12:13:04 PM
Haven't been able to replicate it on test install, next time I see it will try to run it down.