Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 07-05-2011, 07:25 PM
RedDevil's Avatar
RedDevil RedDevil is offline
 
Join Date: Mar 2008
Location: Cumbria, UK
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Incorrect key file for table usercss

Updated mysql and rebuilding database I am receiving this error message

Incorrect key file for table 'usercss'

I have tried repair in admincp under maintenance (didnt work)

I have tried to access and repair using phpmyadmin (wont show the table)

Is there a way to repair or delete this using a query?

Thanks in advance
Reply With Quote
  #2  
Old 07-05-2011, 07:42 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You might try the mysql_upgrade command: http://dev.mysql.com/doc/refman/5.0/...l-upgrade.html (which I believe has to be done from a command line).
Reply With Quote
  #3  
Old 07-05-2011, 08:39 PM
RedDevil's Avatar
RedDevil RedDevil is offline
 
Join Date: Mar 2008
Location: Cumbria, UK
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mysql has just been upgraded thats whats caused the table error i think, 2 running sites and a test site all affected with the same error.
Reply With Quote
  #4  
Old 07-05-2011, 08:49 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Right. I don't know if that will fix your problem or not, but even though mysql_upgrade sounds like it would upgrade your mysql version, what it actually does (according to the docs I linked above) is "examines all tables in all databases for incompatibilities with the current version of MySQL Server." and it also says "mysql_upgrade should be executed each time you upgrade MySQL." I found out about it when I searched for that error you got and found where someone said running mysql_upgrade fixed it.
Reply With Quote
  #5  
Old 07-06-2011, 09:00 AM
RedDevil's Avatar
RedDevil RedDevil is offline
 
Join Date: Mar 2008
Location: Cumbria, UK
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the info i did read through, its supposed to repair all databases on upgrade, but for some reason, all 3 VB4 databases have the same corrupt error all on same table, which is weird.

I can create a new DB and export and import the offending tables but on a site with 18,000 members im reluctant to just do it without making sure its not going to do any major harm, seems this covers custom profiles so wont be a biggy, was hoping maybe someone encountered tis and knew best cure.

The error is also preventing a database backup as it wont go past the corrupt table.
Reply With Quote
  #6  
Old 07-06-2011, 09:10 AM
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Location: India
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

see this thread

Code:
https://www.vbulletin.com/forum/showthread.php/44909-3-ways-to-repair-a-database
if it works for you then its fine or drop all the values in usercss table.
Reply With Quote
  #7  
Old 07-06-2011, 09:20 AM
RedDevil's Avatar
RedDevil RedDevil is offline
 
Join Date: Mar 2008
Location: Cumbria, UK
Posts: 310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok fixed it.

First I created a new VB4 database (basically a new testsite)

Second I exported the usercss tables

Third I dropped the damaged usercss table in main database

I then readded using the query below. If your tables have a prefix then change name in red.

Code:
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))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Reply With Quote
Благодарность от:
fechten
  #8  
Old 03-29-2013, 08:44 PM
brihan brihan is offline
 
Join Date: Jan 2006
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, Sorry to open up an old thread but I need some help with this.

I also have the same issue with the usercss table being corrupt and not being able to backup my database.

I see you have fixed it and posted the directions however I need a little more hand holding to walk me through this.

Where/how do you do this?
Quote:
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))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
One question I have is "What is in the usercss table"? I looked at the good one in my 4.2.0 test site and it was blank. Is there anything important in there?

I just checked the table status and it's create and update date/time are the same so it looks like nothing has ever been done with this table.

Create: 2013-03-01 12:06:53
Update: 2013-03-01 12:06:53
Check: 2013-03-29 16:19:11

From PHPmyadmin can I just drop the corrupt usercss table or can I try to import the blank one from my test site?

Thank for any help you can provide.

Brian
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06813 seconds
  • Memory Usage 2,227KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (1)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete