How to Fix MySQL Error 1030: A Complete Guide

How to fix MySQL Error 1030 with database troubleshooting steps and solutions.

It was a little past 11 p.m. when the alerts started. Our nightly reporting job had failed, and the application logs were full of the same line:

“ERROR 1030 (HY000): Got error 28 from storage engine”

I had seen plenty of MySQL errors before, but Error 1030 is frustrating for one reason: it doesn’t really tell you what went wrong. It only tells you that MySQL asked the storage engine (InnoDB or MyISAM) to do something, and the engine said no.

That night turned into a long one. The first problem was easy to fix. The second one, a corrupted table left behind by the crash, was not. This guide walks through everything I checked, in the order I’d check it again, and the repair approach that finally got my data back.

What MySQL Error 1030 actually means

Error 1030 is a wrapper. The real clue is the number inside the message: “Got error N from storage engine.” That number is either an operating system error code or a storage engine handler code, and it points you to the cause.

You can translate most codes with the perror utility that ships with MySQL:

perror 28

OS error code  28:  No space left on device

These are the codes I’ve run into most often:

Code in the messageWhat it usually means
28No space left on the disk holding the data directory or tmpdir
13Permission denied on a data or temp file
-1InnoDB is in read-only mode, often because innodb_force_recovery is set
126 / 127MyISAM index file or data file is corrupted
134 / 145MyISAM record already deleted, or table marked as crashed
168 / 1Generic engine failure, often disk, temp space or file damage

Once you know the code, you know which part of the system to look at: the disk, the file permissions, the server configuration or the table files themselves.

How to fix MySQL Error 1030 – Manual Methods

Before touching anything, I took a copy of the data directory. If you take only one thing from this guide, make it this: never run repairs on your only copy of a damaged database.

Step 1: Check disk space and tmpdir

This is the quickest check and the most common culprit.

df -h

mysql -e “SHOW VARIABLES LIKE ‘tmpdir’;”

In my case, the partition holding tmpdir was at 100%. I cleared old binary logs with PURGE BINARY LOGS, removed stale temp files and moved tmpdir to a larger partition in my.cnf. The reporting job ran again, and the error 28 was gone.

Step 2: Check file ownership and permissions

If the code is 13, make sure MySQL owns its files:

sudo chown -R mysql:mysql /var/lib/mysql

sudo chmod 750 /var/lib/mysql

On systems with SELinux or AppArmor, also check that a security policy isn’t blocking access to a custom data directory.

Step 3: Turn off innodb_force_recovery

If you see error -1 on INSERT, UPDATE or DELETE, check your configuration:

SHOW VARIABLES LIKE ‘innodb_force_recovery’;

Any value above 0 limits writes. Remove the setting from my.cnf and restart MySQL once your data is safe.

Step 4: Check and repair MyISAM tables

For MyISAM codes like 126, 127 or 145, MySQL’s built-in tools often work:

CHECK TABLE orders;

REPAIR TABLE orders;

If the server won’t cooperate, stop MySQL and run myisamchk on the table files directly:

myisamchk -r /var/lib/mysql/shop/orders.MYI

Step 5: Recover InnoDB with innodb_force_recovery

This is where my night got longer. After the disk filled up, MySQL had shut down uncleanly. Once it was back, one InnoDB table kept throwing Error 1030 on every read past a certain point.

REPAIR TABLE doesn’t work on InnoDB, so the standard approach is to start the server in recovery mode and dump what you can:

[mysqld]

innodb_force_recovery = 1

Start at 1 and raise it one level at a time, never higher than you need. Values of 4 and above can permanently damage data. Then export the table and rebuild it:

mysqldump -u root -p shop orders > orders.sql

I got to level 3 before the server stayed up. But mysqldump still failed partway through the table, at the damaged pages. I had most of my rows, but not all of them. And the latest backup was from the previous night, which meant losing a full day of orders.

When manual fixes weren’t enough: Try MySQL Repair Tool

At that point I had two choices. I could restore last night’s backup and accept the lost rows, or I could try to recover the damaged table itself. I decided to try recovery first, since I still had the backup to fall back on.

I used MySQL Repair by Stellar, a browser-based repair service. I chose it mainly because I didn’t want to install anything new on a server that was already in a fragile state.

How the process went:

  1. Just signed in and upload the file through the browser. No MySQL server or client is needed on your side.
  2. The service analyzed the file and repaired it automatically.
  3. Preview and Download the repaired output.

What I liked

  • It works on files MySQL can’t repair. REPAIR TABLE doesn’t touch InnoDB, and my dump kept failing at the damaged pages. The service handles both InnoDB (.ibd, ibdata1) and MyISAM (.MYD, .MYI) files.
  • Your original file isn’t modified. It reads the file and creates a separate repaired copy.
  • The preview. Seeing row counts before downloading took a lot of the guesswork out.
  • Free for smaller files. Files up to 500 MB repair at no cost, with no credit card. Larger files, up to 5 GB, need the paid plan.
  • Wide version support. It covers MySQL 5.x through 8.0 and 9.x, plus MariaDB.
  • Privacy Concern – Uploads are encrypted and files are deleted automatically (after 24 -48 hours.

What to keep in mind

  • The online version restores tables and records. If you also need views, stored procedures and triggers rebuilt, that’s in the desktop Technician Edition.
  • For very large databases or many files, the desktop edition is the better fit since it has no size limits.

Note:Stellar also has desktop software, Stellar Repair for MySQL, that can repair corrupt MySQL and MariaDB databases on your own machine, with nothing uploaded. It runs on Windows and repairs InnoDB and MyISAM tables along with primary, unique and foreign keys, views, triggers and partitioned tables. It can also repair several databases in one batch, which helps when a crash damages more than one.

Final thoughts

MySQL Error 1030 looks vague, but the number in the message tells you where to look. Start with the simple checks: disk space, permissions and innodb_force_recovery. Most of the time, one of those is the answer.

When the table files themselves are damaged, take a copy first, try MySQL’s own recovery options, and keep your backup ready. If those still leave you short, as they did for me, an online repair service like Stellar Online MySQL Repair is worth trying before you accept data loss. You can preview what it recovers before you download anything, so there’s little to lose by checking.

Frequently asked questions

  1. What does “Got error 28 from storage engine” mean? 

The disk is full. Check free space on the partitions holding your data directory and tmpdir with df -h.

  1. Can REPAIR TABLE fix Error 1030 on InnoDB tables? 

No. REPAIR TABLE only works for MyISAM, ARCHIVE and CSV tables. For InnoDB, use innodb_force_recovery to dump the data, restore from backup, or use a dedicated repair tool.

  1. Is it safe to use innodb_force_recovery? 

Levels 1 to 3 are generally safe for exporting data. Levels 4 to 6 can cause permanent damage, so take a full file-level copy before raising it that far.

  1. Will I lose data fixing Error 1030? 

Not if the cause is disk space, permissions or configuration. If table files are corrupted, some loss is possible, which is why a copy of the data directory comes first.

  1. Can I repair a corrupted MySQL file without installing software? 

Yes. A browser-based service like Stellar Online MySQL Repair lets you upload a damaged .ibd or .MYD file, preview the recovered tables and download the result.

Recommendaed Posts