How to Fix MySQL Error Errcode 28 – No Space Left on Device

MySQL throwing errcode 28 basically means your disk ran out of space, and the database has no room left to write anything. The blog covers what errcode 28 actually means and what you can do to fix MySQL error errcode 28 quickly. Both quick fixes and longer-term solutions are covered, so you are not just patching the problem temporarily. If the error has already caused some damage to your database files, the blog also covers the DatabaseFileRecovery MySQL Database Recovery Tool. It helps you get your data back without much technical hassle and works well when manual fixes are not enough or when the database has gone into a broken state.
Download Now Purchase Now

What is MySQL Errcode 28 

MySQL errcode 28 means your disk is full. When MySQL tries to write data, create a temp file, or log something, and there is no space left on the disk. It does not matter if your query is small or your table is tiny. If the disk has no room, MySQL just refuses to continue. Most people see this error show up in their logs as “errcode 28” or sometimes as “no space left on device,” which is basically saying the same thing in different words. That is why it is important to “resolve MySQL 1030 got error 28 from storage engine”.

How to Confirm the Error 

It is very important to confirm the error before beginning the process to fix MySQL errcode 28 no space left on device. Open your MySQL error log and look for lines that mention errcode 28 or “no space left on device.” You can also run this command in your terminal to check recent errors:

perror 28

It will tell you straight up that error 28 means disk full. That confirmation is enough to move forward with the fix. 

Manual Methods to Fix MySQL Error Errcode 28

There are some DIY solution that helps to fix the error code no 28. You can check each solution to identify the right issue. In case your database file got damaged or corrupted, we have a solution to recover those files as well.

Method 1: Check Disk Space Availability

  1. Open the terminal on your Linux server.
  2. Run the following command:

    df -h

  3. Check whether the root (/) or MySQL partition is full.
  4. Delete unnecessary files or move large files to free up space.
  5. Restart the MySQL service.

Method 2: Clear Temporary Files

  1. Navigate to the /tmp directory:

    cd /tmp

  2. Remove unwanted temporary files:

    rm -rf *

  3. Restart MySQL after clearing the temp folder.

Method 3: Increase Disk Storage

  1. Extend the server partition if disk space is low.
  2. Add additional storage volume if needed.
  3. Verify the new storage allocation using:

    df -h

Method 4: Check MySQL Temporary Directory

  1. Open the MySQL configuration file:

    sudo nano /etc/my.cnf

    or

    sudo nano /etc/mysql/my.cnf

  2. Locate the tmpdir setting.
  3. Change it to a directory with sufficient free space.
  4. Save the file and restart MySQL.

Method 5: Repair File System Errors

  1. Run a filesystem check command:

    fsck

  2. Repair any detected disk issues.
  3. Reboot the system and start MySQL again.

Method 6: Delete Old MySQL Logs

  1. Locate MySQL log files.
  2. Remove unnecessary or oversized logs:

    rm -f *.log

  3. Restart the MySQL service.

These manual methods will help you to fix MYSQL error errcode 28. But there might me chance that your database file might get damaged or corrupted. Then you need to first recover those database files of MYSQL, for which you can use the DatabaseFileRecovery MYSQL Database File Recovery Tool. This automated tool helps to recover the damaged database files with 100% accuracy and no failure. It is used by many enterprise-grade users to recover their MYSQL Database.

Common Causes of MySQL Errcode 28 and Their Solutions

Cause of Error 

What Happens 

Recommended Solution 

Disk storage becomes full 

MySQL cannot create or write files 

Therefore, free up disk space or extend storage 

Temporary directory runs out of space 

Queries stop during execution 

In this case, change the MySQL tmpdir location 

Large MySQL log files 

Server performance becomes unstable 

So, remove old or unnecessary log files 

File system corruption 

MySQL fails to access the database files 

Consequently, run filesystem repair commands 

Massive imports or queries 

Temporary files consume storage quickly 

Thus, increase available server resources 

Conclusion

If you want to fix MySQL error errcode 28, you can use the above solution we discussed. Those methods will help you to fix these issues. Or in case you may find your database file corrupted or damaged, you can use the professional tool to recover your database. Moreover, for any queries or help, you can connect with our technical support team 24*7.

Frequently Asked Questions(FAQS):

Q1. What does MySQL errcode 28 mean and why does it occur?

Ans. MySQL errcode 28 means the server has run out of disk space, or MySQL cannot write temporary files. It usually occurs when the storage partition becomes full due to large databases, log files, backups, or temporary files.

Q2. Why am I getting MySQL errcode 28 even though my disk shows free space?

Ans. This can happen when the specific partition used by MySQL or the temporary directory is full, even if other partitions still have free space. In some cases, inode limits, permission issues, or corrupted file systems can also trigger the error.

Q3. How do I fix MySQL errcode 28 when running a large query or importing millions of rows?

Ans. You can fix MySQL errcode 28 by freeing up disk space, clearing temporary files, increasing server storage, changing the MySQL tmpdir location to a partition with enough space, and deleting unnecessary MySQL log files.

Q4. Can MySQL errcode 28 cause website checkout failures, database backup failures, or Plesk login issues?

Ans. Yes, MySQL errcode 28 can interrupt many database-related operations. It may cause website checkout failures, prevent database backups, stop applications from writing data, and even create issues with hosting panels like Plesk when MySQL storage becomes full.

About The Author:

Meet Shivam, an experienced SEO executive and content strategist. He combines creativity with strategy to craft engaging content that connects with audiences and supports brand goals. With strong expertise in digital marketing and content planning, Shivam helps businesses thrive online.

Related Post