View Full Version : Incorrect key file for table usercss
RedDevil
07-05-2011, 07:25 PM
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
You might try the mysql_upgrade command: http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html (which I believe has to be done from a command line).
RedDevil
07-05-2011, 08:39 PM
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.
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.
RedDevil
07-06-2011, 09:00 AM
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.
Badshah93
07-06-2011, 09:10 AM
see this thread
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.
RedDevil
07-06-2011, 09:20 AM
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.
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;
brihan
03-29-2013, 08:44 PM
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?
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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.