Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: ROGUE-Master on September 27, 2004, 02:24:44 PM

Title: Connection Problems
Post by: ROGUE-Master on September 27, 2004, 02:24:44 PM
http://forums.clanrogue.net

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


This morning when I woke up I saw this error. I checked my MySQL databases, and they all seem to be normal.... And suggestions?
Title: Re: Connection Problems
Post by: Ben_S on September 27, 2004, 02:28:22 PM
Sounds like MySQL is down. Can you connect via phpMyAdmin?
Title: Re: Connection Problems
Post by: ROGUE-Master on September 27, 2004, 02:56:10 PM
Yes I can connect via PHPMyAdmin and all the databases look normal. I don't know whats going on.
Title: Re: Connection Problems
Post by: Ben_S on September 27, 2004, 03:01:06 PM
Check your Settings.php isn't currupt.
Title: Re: Connection Problems
Post by: ROGUE-Master on September 27, 2004, 03:10:38 PM
<?php
/******************************************************************************
* Settings.php                                                                *
*******************************************************************************
* SMF: Simple Machines Forum                                                  *
* Open-Source Project Inspired by Zef Hemel ([email protected])                *
* =========================================================================== *
* Software Version:           SMF 1.0 Beta 5 Public                           *
* Software by:                Simple Machines (http://www.simplemachines.org) *
* Copyright 2001-2004 by:     Lewis Media (http://www.lewismedia.com)         *
* Support, News, Updates at:  http://www.simplemachines.org                   *
*******************************************************************************
* This program is free software; you may redistribute it and/or modify it     *
* under the terms of the provided license as published by Lewis Media.        *
*                                                                             *
* This program is distributed in the hope that it is and will be useful,      *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
* See the "license.txt" file for details of the Simple Machines license.      *
* The latest version can always be found at http://www.simplemachines.org.    *
******************************************************************************/

########## Maintenance ##########
# Note: If $maintenance is set to 2, the forum will be unusable!  Change it to 0 to fix it.
$maintenance = 0;      # Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
$mtitle = 'Maintenance Mode';      # Title for the Maintenance Mode message.
$mmessage = 'Ok faithful users...we\'re attempting to restore an older backup of the database...news will be posted once we\'re back!';      # Description of why the forum is in maintenance mode.

########## Forum Info ##########
$mbname = 'Rogue Squadron';      # The name of your forum.
$language = 'english';      # The default language file set for the forum.
$boardurl = 'http://clanrogue.net/SMF';      # URL to your forum's folder. (without the trailing /!)
$webmaster_email = '[email protected]';      # Email address to send emails from. (like [email protected].)
$cookiename = 'SMFCookie10';      # Name of the cookie to set for authentication.

########## Database Info ##########
$db_server = '127.0.0.1';
$db_name = '*****CENSORED***';
$db_user = '*****CENSOREDCENSORED***';
$db_passwd = '*****CENSORED**';
$db_prefix = 'smf_';
$db_persist = 0;
$db_error_send = 1;

########## Directories/Files ##########
# Note: These directories do not have to be changed unless you move things.
$boarddir = '/home/virtual/site20/fst/var/www/html/SMF';      # The absolute path to the forum's folder. (not just '.'!)
$sourcedir = '/home/virtual/site20/fst/var/www/html/SMF/Sources';      # Path to the Sources directory.

########## Error-Catching ##########
# Note: You shouldn't touch these settings.
$db_last_error = 1096264998;

?>


Could that DB last error be the problem?
Title: Re: Connection Problems
Post by: Ben_S on September 27, 2004, 03:17:16 PM
Looks fine to me. Try repairing all the tables with phpmyadmin, it's possible one of the tables may be damaged.
Title: Re: Connection Problems
Post by: ROGUE-Master on September 27, 2004, 03:26:03 PM
I repaired them all and it still shows the same message. Let me reiterate that this happened randomly last night. No changes to the server at all. Just crash, bang, boom. Any more suggestions?
Title: Re: Connection Problems
Post by: Ben_S on September 27, 2004, 03:42:27 PM
Try this, obviously change the user and pass to your details

<?php
$connection
= @mysql_connect("localhost","user","pass")
       or die(
"Couldn't connect.");if ($connection)
{
$message = "Successful mySQL connection.";}
?>
<html>
<head>
       <title>mySQL Test</title>
</head>
<body>
<?php
echo "$message";
?>
</body>
</html>


Save it as test.php or something and upload it and see what it says when you browse to it.
Title: Re: Connection Problems
Post by: ROGUE-Master on September 27, 2004, 03:46:28 PM
Nevermind. I talked to my server admin, and when he restarted the MySQL on the server, it fixed the problem. :P

But I still have no clue how this happened to something went wrong. :P
Title: Re: Connection Problems
Post by: Ben_S on September 27, 2004, 03:58:44 PM
MySQL can sometime hang and refuse connections. Glad you got it fixed.