2014-11-04 232 views
1

我在本地主机上用Drupal 7制作网站。今天,我得到了我的cache_rules丢失的知名错误。我试图恢复它。这似乎有效,因为我现在在我的数据库中看到了表格。但是,PHPMyadmin在查询后说'结果回来了'。它是否正确。SQLSTATE [HY000]:一般错误:1030

我用这个代码,以恢复它:

CREATE TABLE IF NOT EXISTS `XX_cache_rules` (`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.', `data` longblob COMMENT 'A collection of data to cache.', `expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.', `created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.', `serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).', PRIMARY KEY (`cid`), KEY `expire` (`expire`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.'; 

它来自:https://www.drupal.org/node/2160645

但是当我现在尝试清除我的缓存,我得到一个新的错误:

PDOException: SQLSTATE[HY000]: General error: 1030 Got error -1 from storage engine: TRUNCATE {cache_rules} ; Array () in cache_clear_all() (line 165 of C:\Users\Mariska\Sites\devdesktop\includes\cache.inc). 

我做了备份并重新安装了开发桌面。我用我的一个备份替换了Sites/DevDesktop文件夹,并将database.mysql放入MYSQL文件夹中。

然后我得到了一个cache_field错误,恢复了查询并再次发生了cache_rules错误。以与之前相同的方式恢复。在这两种情况下,PHPMyadmin都表示查询后的'结果可以倒空'。

然后同样的错误1030 ...

我终于弄明白了。这完全是一个存储问题。这是我的病毒扫描器,把所有东西搞砸了,迈克菲。我现在得到了一个新的,一个不会占用我笔记本电脑性能的太多空间。让我们来看看。

谢谢, Mariska。

+0

您应该将Claudiu的答案标记为解决方案 – Jonathan 2017-03-27 09:08:13

回答