Sorry, SMF was unable to connect to the database. This may be caused by the ser

Started by everseekerx, November 02, 2005, 08:42:09 AM

Previous topic - Next topic

everseekerx

I am constantly getting " Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later." on my server.
Thought it was just me, but I am seeing it here as well....
Is this something considered "normal" or is there an issue with 1.1RC1???

Psyclones


Ben_S

It's due to either too many connections on the server or incorrectly set details in your Settings.php

Here it's due to max connections, we are on  a new server and someone just needs to tweak the mysql config a bit.
Liverpool FC Forum with 14 million+ posts.

everseekerx

If I was to call my host and ask them to check into the problem, what  would I ask them to do?
(for example, "...someone just needs to tweak the mysql config a bit...." means ?

Ben_S

Save the following as test.php and upload it to your forum directory, then visit the file in your browser and see what it says.

<?php

require('Settings.php');

mysql_connect($db_server, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());

?>
Liverpool FC Forum with 14 million+ posts.

Cabbie

ive got the same problem but when running this test.php i get

Warning: mysql_connect(): Access denied for user: 'jaz@localhost' (Using password: NO) in /usr/local/psa/home/vhosts/tnp-uk.co.uk/httpdocs/forum/test.php on line 5
Access denied for user: 'jaz@localhost' (Using password: NO)

any ideas plz ?

redone

The above is basically incorrect Mysql info. Check either username/password or db name because one of them is probably wrong.

Repair_settings.php will generally tell you where your problems are:

http://www.simplemachines.org/community/index.php?topic=18096.0

~redone

inthe80s

Quote from: Ben_S on November 02, 2005, 11:34:52 AM
Save the following as test.php and upload it to your forum directory, then visit the file in your browser and see what it says.

<?php

require('Settings.php');

mysql_connect($db_server, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());

?>

I just tried this and it didn't work for me... but that's because my Settings.php is defined with $db_passwd not $db_pass.  Not sure if that's a 1.1 change or not.  Just an FYI incase anyone else finds this old thread when trying to troubleshoot a connection problem.
Running SMF since May '04.  Started with YaBB on Oct 2001.

frenz

Quote from: Ben_S on November 02, 2005, 11:34:52 AM
Save the following as test.php and upload it to your forum directory, then visit the file in your browser and see what it says.

<?php

require('Settings.php');

mysql_connect($db_server, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());

?>


thanks for this sharing bro its fix my problem at settings.php wrong db user :D

musc

I have this error (unable to connect to database),I tried all but they didn't solve my problem.What should I do?My host says is my forums' problem.

Gaurav Arora

Quote from: Ben_S on November 02, 2005, 11:34:52 AM
Save the following as test.php and upload it to your forum directory, then visit the file in your browser and see what it says.

<?php

require('Settings.php');

mysql_connect($db_server, $db_user, $db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());

?>

After running above script, I found : Undefined variable: db_pass

Also I have run repair_settings.php but there is still same issue.

Lady Godiva

If anyone in this thread is hosting on Enom - they were doing the yearly upgrades and maintenance from 11:59 am PST through late today. If your getting these errors and are on Enom servers, the maintenace they are doing only lasts for about 1 1/2 hours per 'set' being completed.
Hope this helped some of you.

Rumbaar

I'll mark this thread as solved, as it was created back in 2005!  If you have new issues that related to your own forum, please create your own new threads:
How do I ask support questions the smart way?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

analia

Hello to all, unfortunately and I have this problem in my forum comes this ..

Connection Problems

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

Do not know why mar where we do not have FTP access in all frost of the server and are therefore lies. but I remember when I had a forum before this when giving this problem of carrying one or two hours and then continue sewing work regularly.

Thank you very for your attention

C4G-TK

I've been receiving this error all morning on my RC5 forum.  Is the following code the same for the RC5 version?

<?php

require('Settings.php');

mysql_connect($db_server$db_user$db_pass) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());

?>



-img removed-

swapnil0545

Same here.
I m getting it past 16 hrs.
I checked my MYSQL thing... its working fine.

Illori

swapnil0545 please open your own topic. your post can get lost here otherwise.

antonio.carceles

I have had these problems.

I have fixed. Look for Settings.php

I had this
########## Forum Info ##########

$boardurl = url without www;      # URL to your forum's folder. (without the trailing /!)

Then I have changed:
########## Forum Info ##########

$boardurl = 'URL WITH www';      # URL to your forum's folder. (without the trailing /!)

And now it's working well


P.S: I hate this verification.....


Irisado

Thanks for the information, but as this topic was solved six years ago, it would have been better to leave it be.  Please avoid reviving such old topics in the future.  Topic locked.
Soñando con una playa donde brilla el sol, un arco iris ilumina el cielo, y el mar espejea iridescentemente

Advertisement: