Thursday, March 13, 2014

Cannot find or open table wp_kstats_raw

This error usually occurs because the table has crashed or some other INNODB error. Usually its best to just recreate the table from scratch
DROP TABLE IF EXISTS `wp_kstats_raw`;
CREATE TABLE `wp_kstats_raw` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `timestamp` datetime NOT NULL,
  `ip` int(10) unsigned NOT NULL,
  `url` varchar(1024) NOT NULL,
  `referrer` varchar(1024) NOT NULL,
  `user_agent` varchar(1024) DEFAULT NULL,
  `os` varchar(255) DEFAULT NULL,
  `browser` varchar(255) DEFAULT NULL,
  `search_engine` varchar(255) DEFAULT NULL,
  `search_terms` varchar(255) DEFAULT NULL,
  `spider` varchar(255) DEFAULT NULL,
  `feed` enum('','ATOM','COMMENT ATOM','COMMENT RSS','RDF','RSS','RSS2') DEFAULT NULL,
  `user` varchar(255) DEFAULT NULL,
  `preserved` enum('1') DEFAULT NULL,
  UNIQUE KEY `id` (`id`),
  KEY `timestamp` (`timestamp`),
  KEY `ip` (`ip`),
  KEY `url` (`url`(255))
) ENGINE=InnoDB AUTO_INCREMENT=262808 DEFAULT CHARSET=utf8;

No comments:

Post a Comment