|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21032 is a reply to message #21022] |
Tue, 09 November 2004 13:58 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You need to repair the mYSQL tables. Fortunately this is very easy to do, on the MySQL command line you need to run
REPAIR [table_name]; command.
The table name is the 1st part of the fud_thread.MYI string, Ex. fud_thread
FUDforum Core Developer
|
|
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21036 is a reply to message #21034] |
Tue, 09 November 2004 18:17 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Try asking your ISP about the unrepairable table, it could be file permissions issue meaning that your MySQL user does not have rights to those tables.
This happenss because when mysql crashes or not shutdown properly it could be in the process of writing data to the database and when it dies ends up writing partial data. This partial data causes the database file to be corrupt. Usually because this data is at the end of the database REPAIR table can fix it.
FUDforum Core Developer
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21037 is a reply to message #21035] |
Tue, 09 November 2004 18:18 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
creamywf wrote on Tue, 09 November 2004 13:16 |
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /hsphere/local/home/aag522/wf4bm.net/forum/index.php on line 57
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /hsphere/local/home/aag522/wf4bm.net/forum/index.php on line 57
Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /hsphere/local/home/aag522/wf4bm.net/forum/index.php on line 57
Fatal error: SQL Error has occurred, please contact the administrator of the forum and have them review the forum's SQL query log in /hsphere/local/home/aag522/wf4bm.net/forum/index.php on line 45
|
This is a different error, it's a connection issue. The database server either is not running or the unix domain socket's path had changed. You can find out the server's new address (ip) or new path to the unix domain socket from your ISP.
FUDforum Core Developer
|
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21047 is a reply to message #21041] |
Wed, 10 November 2004 14:10 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Ok it seems like he ran all the appropriate database repair commands. Before we assume the worst could you please tell me what is the error that the forum is now reporting?
FUDforum Core Developer
|
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21054 is a reply to message #21053] |
Wed, 10 November 2004 20:48 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Could it be that the ISP restored the data from (old) backups?
You can also try to rebuild the theme and run the consistency checker in the forum.
FUDforum Core Developer
|
|
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21057 is a reply to message #21056] |
Thu, 11 November 2004 01:15 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The error given it's randomness says to me you are hitting maximum allowed connections to the mysql server. Are you using persistent connections (option inside the forum's database settings)?
FUDforum Core Developer
|
|
|
|
|
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21068 is a reply to message #21064] |
Thu, 11 November 2004 13:33 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
If the database is corrupt like your web host is saying, unfrotunately there is not much I could do other then what your web host had already tried.
it seems like the only option now is to recover database data from some backup made either by you or your host.
FUDforum Core Developer
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21076 is a reply to message #21068] |
Thu, 11 November 2004 18:39 |
|
creamywf
Messages: 54 Registered: April 2002
Karma: 0
|
Member |
|
|
I have another question, which I think is important.
Server crashes and inappropriate shutdowns happen. If the mysql database gets corrupted and has unrepairable files and this happens numerous times over a year, you end up with these unrepairable files hanging on even when you don't know they are there and after a while, collectively they can cause problems.
We had a hosting service whose servers crashed frequently and we repaired the database each time. The last time, over a year ago, it took a lot of work to salvage the databases. Now we've experienced our first improper shutdown and the unrepairable files from a year ago, plus now, are creating havoc.
Members of our forum would prefer to NOT lose any current data (posts, images) as our last back up was prior to the election and there was a lot of discussion during that time. Even going back to the last backup which is now about 3 weeks ago, won't help because that backup contained existing problems from what we went through with crashes with our other host over a year ago.
Other than daily backups, is there anything that can be done about this situation where mysql database files become so corrupted that files are unrepairable when a server shuts down suddenly?
|
|
|
Re: MYSQL MESS AFTER HOSTING SERVICE CRASH [message #21077 is a reply to message #21076] |
Thu, 11 November 2004 20:05 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Frequent updates are always good.
Running OPTIMIZE TABLE [forum tables] (forum cosnsitency checker will do this for you) once per week or so is good preventative measure.
That said in 99% of cases premature shutdown of MySQL server will not cause a permanent corruption like the one you seem to have experienced and a simple REPAIR TABLE cannot fix.
FUDforum Core Developer
|
|
|
|
|