【发布时间】:2014-12-31 11:54:37
【问题描述】:
我正在我的本地主机上使用 Drupal 7 创建一个网站。今天我得到了我的 cache_rules 丢失的众所周知的错误。我试图恢复它。这似乎奏效了,因为我现在在我的数据库中看到了该表。但是,PHPMyadmin 在查询后表示“结果返回为空”。这对吗?
我用这段代码来恢复它:
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).
我已备份并重新安装了 Dev Desktop。我用我的备份替换了 Sites/DevDesktop 文件夹,并将 database.mysql 放在 MYSQL 文件夹中。
然后我得到了一个 cache_field 错误,通过查询和 cache_rules 错误再次恢复了它。以与之前相同的方式恢复。在这两种情况下,PHPMyadmin 在查询后都表示“结果可以返回为空”。
然后同样的错误 1030...
我终于明白了。毕竟这是一个存储问题。是我的病毒扫描程序搞砸了一切,McAfee。我现在买了一个新的,它不会占用我笔记本电脑的太多空间。让我们看看。
谢谢, 玛莉丝卡。
【问题讨论】:
-
您应该将 Claudiu 的答案标记为解决方案
标签: mysql error-handling drupal-7