MyBB Community Forums

Full Version: Board seems to have crashed [solved - Thanks!]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I set up a board for my scout troop and every thing worked fine for a few days. I then started to receive the following error message when trying to acces the board or the admin control panel.

Quote:
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/www/bricktroop60.awardspace.com/Forums/inc/db_mysql.php on line 313
MySQL error:
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/www/bricktroop60.awardspace.com/Forums/inc/db_mysql.php on line 314


Query:


These are lines 313-314 from db_mysql.php:

Quote: echo "MySQL error: " . mysql_errno($this->link);
echo "<br />" . mysql_error($this->link);

I am new at this and have no idea what this means. Can anyone give me a clue as to what might be wrong and where I should look to fix it? I have already used PHPmyAdmin to check the tables (after seeing this suggestion in another post) but it says they are all OK.

Any help anyone can offer would be much appreciated.

Thank you.
Has anything changed since the initial install (ie: have they installed any mods or done anything different to the server since your install?)?

Also those two lines you refer to are unfortunately pointed to and while they hold the error they don't tell you where the problem lies.

Are you getting this error on every page or just specific pages?
This is the strangest error. Doesn't seem to be any rhyme or reason for it either! I tried to access the last post a few weeks ago on my forum, at the same time someone else was posting a new reply to the same thread, and I was sent to that EXACT same error! Someone else recently *that you were helping, Snakeyes* had the EXACT same error while trying to upgrade their board...and now again! Seems there is some bug in that code! Hopefully one of the devs can pin point it one of these days! Luckily, I haven't encountered it on my forum since, but who knows?
It's because of an error in the error reporting for mysql it doesn't show you the right error.
The error should be that it couldn't connect to the database. Please check your config.php.
Thank you all for your responses.

SnaKEyez, I don't know if anything has been done on the server (it is on a free account at Awardspace.com). The error occurs on when I try to enter the forum or the admin cp, there seems to be absoulutely no access.

judel, how did you resolve the error? The only thing that I can think of is reinstalling the board, but I am afraid that I will lose the css (a minor concern, fixable) and the posts and calendar (more serious, but not fatal as it is a fairly new board, but quite a pain.) I also wonder if it is worth it since there is no way to know if it will happen again.

CraKteR, can you tell me what I should be checking for in config.php? I am a total newbie and don't have a clue what to look for.

Thanks again for your help.
So you were never able to enter the forum?
$config['dbtype'] = 'mysql';
$config['hostname'] = 'localhost';
$config['username'] = 'root';
$config['password'] = '*****';
$config['database'] = 'mybb';
$config['table_prefix'] = 'mybb_';
Check that the text between = ' and '; is correct from your servers configurations.
$config['hostname'] usually is localhost.
$config['username'] can be other then root, check what you have on your host.
$config['password'] is the password of the user you have.
$config['database'] is the database table name in your Database.
$config['table_prefix'] is what you installed MyBB with. Default is mybb_
Thank you, CraKteR. You are a lifesaver. The problem was a password change on the server. Apparently there is no provision in MyBB to ask for a password if access is denied. Changing the password in config.php has restored access.

Of course, this problem surfaced just after the board was announced to the entire troop. I changed the password on the database after the first weeks of shakedown to make sure everything was working. I had no idea that a password change on the server would totally prevent any access to the board, even to tell MyBB the new password. All is well again.

Do you know where issues like this should be reported? I think that a future update to MyBB could address this and prompt for database info and password if access is denied, rather than totally failing.
I don't think it should.
I think the error reporting should be fixed however so it tells you "no access" instead of printing that error.
The database shouldn't need to change it's password AFTER install anyways.
Yeah!  Giving such a generic error is frustrating.  When I accidentally changed my password with the 1.1.x, I was told that the forum couldn't access the database because of incorrect password, so I knew how to fix the problem!

So I guess with 1.2 ANY problems accessing the database will result in that error?  Jeesh!  And Atlantes, I didn't resolve the problem.  I just refreshed my screen and my forum came back.  It was just a collision with me and another member at the same time.  Not exactly an ideal situation, as other members might see this error on occassion and freak out!  Doesn't exactly look professional, that's for sure!  LOL  Wink

By the way, I'm glad Crakter was able to help you fix your problem!  Big Grin