MySQL Error Code: 1030Got error -1 from storage en

2020-07-10 07:17发布

I have a database including some tables, when I want to delete data from tables which includes an "Auto Increment" field, using this query:

delete from test.table1 ;

I got this error:

 Error Code: 1030Got error -1 from storage engine

Why this happens? What should I do?

12条回答
混吃等死
2楼-- · 2020-07-10 07:22

I also met this error while deleting 2 rows from an Innodb table, only 2 particular rows can't be deleted. I Google the error, but can't find better solutions.

So i tried this:

  1. Create a backup for my db (exporting db).

  2. Re-Installing MySQL Server

  3. Restoring my db (importing db).

  4. Then there is no -1 engine error on deletion/update.

Success...

I think the error may occur due to invalid configuration of MySQL server with respect to storage engines.

Thank You....

查看更多
Root(大扎)
3楼-- · 2020-07-10 07:26

I see no answer has been selected as the right answer.

I found that in our database config we had the innodb_force_recovery configured. Once we disabled / commented it out, the queries ran as expected.

查看更多
家丑人穷心不美
4楼-- · 2020-07-10 07:28

For me the problem was solved by restarting my database (in my case Mariadb).

systemctl restart mariadb
查看更多
我欲成王,谁敢阻挡
5楼-- · 2020-07-10 07:29

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

Comment line innodb_force_recovery=1

Save the file and restart mysql

查看更多
贼婆χ
6楼-- · 2020-07-10 07:34

Try to change innodb_force_recovery value (in your /etc/my.cnf).

Error -1 says NOTHING. Without your tables creation code (SHOW CREATE TABLE table_name) can not say where exactly problem is.

查看更多
ゆ 、 Hurt°
7楼-- · 2020-07-10 07:34

Here's how I solved it, I just had the same error:

  1. Open Control Panel
  2. Select Unistall Programs
  3. Right click and select"Uninstall" on Microsoft Visual Basic Tools
  4. Restart your PC
查看更多
登录 后发表回答