PDA

View Full Version : SQL errors and etc


DavidWWL
08-26-2009, 05:31 PM
I hope this is the right section of the forum to post this subject in.

This morning, there were html snippets displayed next to somebody's username on my forum.

I went to the maintenance area in admincp and ran the "repair tables" to see if that would fix the issue, and after that, started getting msql errors, and the site does not load any more (webworldlounge.com)

When I went back to poke around in admincp, it brought me to a screen saying that "There are currently 102 customized template(s) that need to be updated or reverted. Some sections of vBulletin may not function if you do not do this!"

I'm not sure whether it's safe to click on "revert" (see screenshot here: http://img29.imageshack.us/img29/3960/wwlupdatedtemplates.jpg), or if I need to do something manually to fix/save these files so that they will be the same as they were before this problem happened.

Database repair was tried through cpanel, and resulted in many errors, examples from the generated report; I edited out the "ok" items to show just the error items:

-----------------
MySQL Account Maintenance

Repairing Database
webworld_forum is now being repaired.
webworld_forum.calendarpermission OK
webworld_forum.cpsession
note : The storage engine for the table doesn't support repair
webworld_forum.pollvote OK
webworld_forum.post
Error : Table './webworld_forum/post' is marked as crashed and should be repaired
Error : Table 'post' is marked as crashed and should be repaired
status : Table is already up to date
webworld_forum.session
note : The storage engine for the table doesn't support repair
webworld_forum.templatehistory OK
webworld_forum.thread
Error : Table './webworld_forum/thread' is marked as crashed and should be repaired
Error : Table 'thread' is marked as crashed and should be repaired
status : Table is already up to date
webworld_forum.usercss
Error : Incorrect key file for table 'usercss'; try to repair it
error : Corrupt
-------------------------------

If anybody could offer any help or advice I'd greatly appreciate it.

Lynne
08-26-2009, 05:46 PM
Sometimes you need to run repair/optimize a couple of times before they are all repaired/optimized.

Right now your thread and post tables are marked as crashed. You need to repair/optimize them until it no longer says that.

DavidWWL
08-26-2009, 05:54 PM
OK I'll try that. For some reason, the site started loading after all, even though I hadn't done anything else.

I'll try the repair/optimize again :)

--------------- Added 1251313203 at 1251313203 ---------------

Those tables fixed ok after a few tries. Still getting some error in regard to usercss and html snippets displayed next to a member's name wherever it's displayed for "posted by".

Here is the error for he usercss, I'm not sure what to do about that. Do I need to replace a file or something?

usercss Check Error: Incorrect key file for table 'usercss'; try to repair it
usercss Check Error: Corrupt

--------------- Added 1251313575 at 1251313575 ---------------

I had logged out of the forum and now cannot log in. Getting a database error on login attempts. What do I do now? :(

--------------- Added 1251316686 at 1251316686 ---------------

Login issue seems to have resolved itself.

Corrupt usercss table is still an issue. Not sure what to do.

Lynne
08-26-2009, 08:36 PM
I'm not an expert on databases, so I'm not sure what to do about the corrupt table. You should probably ask over on vb.com.

Also, when asking for help with database errors, you need to copy/paste the exact error. There are soooo many different types of errors a database can give, so we need to know exactly which you are getting.

Marco van Herwaarden
08-28-2009, 09:19 AM
This again proofs why i always stress not to repair a database unless it is needed. Reparing tables will never fix "some HTML appearing". It should only be used if a MySQL errors tells you there is corruption.

Try repairing the usercss table a few more times. If this doesn't fix you issue, then you could try to drop the indexes and re-add them. The full definition of this table is (in 3.8.4):
CREATE TABLE `usercss` (
`userid` int(10) unsigned NOT NULL default '0',
`selector` varchar(30) NOT NULL default '',
`property` varchar(30) NOT NULL default '',
`value` varchar(255) NOT NULL default '',
PRIMARY KEY (`userid`,`selector`,`property`),
KEY `property` (`property`,`userid`,`value`(20))
)