MySQL error code: error 1030Got -1 from the storage engine; I tried to delete data from my database

I have a database, including some tables, when I want to delete data from tables that contain the "Auto Increment" field using this query:

delete from test.table1 ; 

I got this error:

  Error Code: 1030Got error -1 from storage engine 

Why is this happening? What should I do?

+7
database mysql
source share
9 answers

Try changing the value of innodb_force_recovery (in /etc/my.cnf ).

Error -1 says NOTHING. Without the table creation code ( SHOW CREATE TABLE table_name ), you cannot say where exactly the problem is.

+7
source share

You will also get this error if your file system is full.

+3
source share

I just got this, and this is because the new folder on the SSD, where I need the new table, was created as root, and mysql is started under the mysql user. So cd to chown mysql data folder. and this solves the problem.

+1
source share

Go to /etc/my.cnf or / etc / mysql / my.cnf

Comment line innodb_force_recovery = 1

Save the file and restart mysql

+1
source share

try repair table (ISAM engine)

if his innodb engine looks at this link:

http://www.mysqlperformanceblog.com/2008/07/04/recovering-innodb-table-corruption/

0
source share

I also met this error when deleting 2 rows from an Innodb table, only two specific rows cannot be deleted. I am Google bug, but can not find the best solutions.

So, I tried this:

  • Create a backup for my db (export db).

  • Reinstalling MySQL Server

  • Restoring my db (import db).

  • Then, when deleting / updating the error -1 is not.

Success...

I think the error may occur due to incorrect MySQL server configuration regarding storage mechanisms.

Thanks....

0
source share

FIXED !! check your memory for df -h . also check inodes df -i . if it is full, delete some files.

0
source share

I see that the answer was not selected as the correct answer.

I found that innodb_force_recovery is configured in our database configuration. As soon as we disabled / commented on this, the requests were executed as expected.

0
source share

Just change to

 #innodb_force_recovery = 1 

This works for me.

-one
source share

All Articles