Mysql'来自存储引擎的错误-1'错误 [英] Mysql 'Got error -1 from storage engine' error

查看:283
本文介绍了Mysql'来自存储引擎的错误-1'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个myism表'test',其中保存了一些过时的数据,现在我想重新创建该表,所有列都相同,只是我将存储从myism更改为innodb.我用来重新创建表的转储sql就像:

I have a myism table 'test' which holds some out-dated data, now I want to recreate the table, all columns the same except that I changed the storage from myism to innodb. The dumped sql I used to recreate the table is like:

drop table test;
create table test ( ... )
engine=innodb

insert into test(...) values(...)

那是我收到错误消息来自存储引擎的错误-1"的地方,我在Google周围搜索,大多数结果集中在损坏的innodb表上.虽然对于我而言,我认为它没有损坏,但这只是我在创建和创建语句时所错过的东西.

that's where I got the error "Got Error -1 from storage engine", I have googled around, most of the results focus on corrupted innodb tables. While for my case I don't think it's broken, it's just something I missed at the drop and create statements.

另一件事是在执行了上面的sql之后,用于表测试的所有文件都是一个名为file.frm的文件,我想innodb表还需要其他一些东西才能运行,但不确定是什么.

Another thing is that is after a executed the above sql, all that's left for table test is a file named file.frm, I guess innodb table needs some other stuff to run on but not sure what.

如何解决此问题?我可能需要执行更多此类任务,删除myism表并将其重新创建为innodb的正确过程是什么?

How can I fix this problem? And I probably need to do more tasks of this kind, what's the correct procedure to drop myism table and recreate them as innodb ones?

谢谢.

推荐答案

确定.我找到了解决方案. 该问题是由my.cnf中的 innodb_force_recovery 参数引起的,该参数设置为4.

OK. I found the solution. The issue was caused by innodb_force_recovery parameter in my.cnf, that was set to 4.

要解决此问题,请将其设置为0或从my.cnf中完全删除此参数

To solve the problem, set to 0 or completely remove this parameter from my.cnf

如果检查错误日志,则在查询过程中,mysql将以人类可读的语言编写:在启用innodb恢复模式之前,它不会让您更改表中的任何内容,确切地说是下一条消息:

If you check error log, during query, mysql will write in human readable language that: It won't let you change anything in table until innodb recovery mode is enabled, exactly next message:

InnoDB: A new raw disk partition was initialized or
InnoDB: innodb_force_recovery is on: we do not allow
InnoDB: database modifications by the user. Shut down
InnoDB: mysqld and edit my.cnf so that newraw is replaced
InnoDB: with raw, and innodb_force_... is removed.

请参考: http://bugs.mysql .com/bug.php?id = 30225

这篇关于Mysql'来自存储引擎的错误-1'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆