简体   繁体   English

SQLSTATE [HY000]:一般错误:1030

[英]SQLSTATE[HY000]: General error: 1030

I am making a website with Drupal 7 on my localhost. 我正在本地主机上使用Drupal 7创建一个网站。 Today I got the well-known error that my cache_rules was missing. 今天,我收到一个众所周知的错误,即我的cache_rules丢失了。 I tried to restore it. 我试图还原它。 That seemd to have worked, because I see the table in my database now. 这似乎行得通,因为我现在在数据库中看到该表。 However, PHPMyadmin said after the query that the 'results came back empty'. 但是,PHPMyadmin在查询后说“结果返回为空”。 Is this correct. 这个对吗。

I used this code to restore it: 我使用以下代码将其还原:

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.';

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

But when I try to clear my caches now, I get a new error: 但是,当我现在尝试清除缓存时,出现了一个新错误:

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).

I have made a backup and reinstalled Dev Desktop. 我已备份并重新安装了Dev Desktop。 I replaced the Sites/DevDesktop folder with the one of my backup and placed the database.mysql in the MYSQL folder. 我用备份之一替换了Sites / DevDesktop文件夹,并将database.mysql放在MYSQL文件夹中。

Then I got a cache_field error, restored that with a query and again the cache_rules error. 然后,我遇到了cache_field错误,并通过查询将其恢复,然后再次发生cache_rules错误。 Restored that in the same way as earlier. 以与以前相同的方式恢复了该状态。 In both cases PHPMyadmin said that the 'results can back empty' after the query. 在这两种情况下,PHPMyadmin都说查询后的“结果可以返回空”。

And then the same error 1030... 然后出现相同的错误1030 ...

I finally figured it out. 我终于弄明白了。 It was a storage problem afer all. 毕竟这是一个存储问题。 It was my virus scanner that messed everything up, McAfee. 迈克菲,是我的病毒扫描程序弄乱了一切。 I got a new one now, one that would not take so much space in the performance of my laptop. 我现在得到了一个新笔记本,它不会占用我的笔记本电脑性能那么大的空间。 Let's see. 让我们来看看。

Thanks, Mariska. 谢谢,马里斯卡。

I think this is a mysql related issue. 我认为这是与mysql相关的问题。
This might help you though MySQL Error Code: 1030Got error -1 from storage engine; 尽管这可能会帮助您,但存储引擎的MySQL错误代码:1030Got error -1; I've tried to delete data from my database In brief, your system disks are full or try a table/engine recovery. 我试图从数据库中删除数据简而言之,您的系统磁盘已满或尝试恢复表/引擎。

Same error, 64 bit MariaDB, Drupal, NOD32 antivirus. 同样的错误,64位MariaDB,Drupal,NOD32防病毒软件。 Solution: Disable the resident antivirus protection for MySQL folder. 解决方案:禁用MySQL文件夹的常驻防病毒保护。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM