rexxy Posted November 30, 2015 Posted November 30, 2015 I'm suddenly getting this error:Error: 145 - Table 'sessions' is marked as crashed and should be repaired I have tried repairing the table in phpmyadmin, which said it ws successful but the error persists. I cleared that table but the error is still happening. Can anyone help with it please? What should I try next?http://www.olympia.com.au/giftshop/
rexxy Posted November 30, 2015 Author Posted November 30, 2015 So I think I need to drop and recreate this table, can someone give me the structure for the table?CREATE TABLE IF NOT EXISTS `sessions' ETC.
clustersolutions Posted November 30, 2015 Posted November 30, 2015 @@rexxy, NO, do not drop table....do a REPAIR repair table sessions; should fix your issue. you should not need to drop the session table. Also, the worst case... truncate table session; after fixing the issue. I don't think anyone is online anyway... So I think I need to drop and recreate this table, can someone give me the structure for the table?CREATE TABLE IF NOT EXISTS `sessions' ETC.
rexxy Posted November 30, 2015 Author Posted November 30, 2015 Too late! I did try repair but it didn't help I dropped the table then recreated it with this:CREATE TABLE IF NOT EXISTS `sessions` ( `sesskey` varchar(32) NOT NULL DEFAULT '', `expiry` int(11) unsigned NOT NULL DEFAULT '0', `value` text NOT NULL, PRIMARY KEY (`sesskey`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; And it seems to have solved the problem. Thanks for trying to help me Tim
MrPhil Posted November 30, 2015 Posted November 30, 2015 Depending on what version of osC you are using, your text field entries might be latin1 or utf-8. Be sure you specified the right DEFAULT CHARSET to match what the rest of your store uses. Also, the DB "engine" should match what other tables are using (MyISAM, INNODB, etc.). As for recreating the table to fix the error, that could be necessary if the table schema was corrupted at some point. That's something to worry about, as other tables in your database might have gotten corrupted too (keep an eye out). You might want to report this to your host, in case they want to look for other problems.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.