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:35

I just got this one and it was due to the fact that the new folder on the SSD drive where I wanted the new table to go was created under root and mysql runs under the mysql user. So cd to your data folder chown mysql . and it solves the problem.

查看更多
【Aperson】
3楼-- · 2020-07-10 07:37

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

查看更多
ゆ 、 Hurt°
4楼-- · 2020-07-10 07:37

Just modify to

#innodb_force_recovery = 1

It works to me.

查看更多
Rolldiameter
5楼-- · 2020-07-10 07:39

try repair table (ISAM engine)

if its innodb engine look at this link :

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

查看更多
淡お忘
6楼-- · 2020-07-10 07:39

FIXED!! check your memory by df -h. also check inodes df -i. if its full, delete some files.

查看更多
倾城 Initia
7楼-- · 2020-07-10 07:46

Find the value of innodb_force_recovery at /etc/mysql/my.cnf(for linux). if it is 0, remove it or comment it out.

Example

innodb_force_recovery = 0

change it to:

#innodb_force_recovery = 0

Reference:

InnoDB: innodb_force_recovery is on: we do not allow InnoDB: database modifications by the user.

查看更多
登录 后发表回答