MySQL error 28 and solution

Q. I am getting an error that read as follows:


MySQL: got error 28 from server handler

How do I fix this problem?

A. This error means no space left on hard disk. According to official MySQL docs, “If you get his error, you need to check all filesystems where MySQL operates. It may be single filesystem or as we recommend you can have datadir, tmpdir and log files split into dedicated filesystems.”


a) Stop mysql server
# /etc/init.d/mysql stop
# /etc/init.d/mysqld stop
b) Check filesystem and /tmp directories:
$ df -h
$ cd /tmp
$ df -h /tmp

c) Remove files from /tmp to free up space:
# cd /tmp
# rm -rf *

d) Look into /var/log directory and remove or compress logs file.

e) Use myisamchk command to check and repair of ISAM table:
# cd /var/lib/mysql
# myisamchk

f) Increase disk space (add new hard disk or remove unwanted software(s) )

g) Start the mysql server:
# /etc/init.d/mysql start
# /etc/init.d/mysqld start

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

10 comments… add one
  • Peter Feb 2, 2010 @ 8:28

    Thank you for this! This helped save me a ‘VERY’ large headache!

  • tom Jul 21, 2010 @ 6:33

    Very helpful. First hit on google and saved my morning!

  • Juniefer Feb 21, 2011 @ 5:39

    Thanks. It was a great help indeed.

    I am saving the solution to my email.

    great help cheers

  • Stan Apr 18, 2011 @ 7:25


    This one thing saved my lot of time.

  • Anton Jul 1, 2011 @ 2:24

    Excellent guide.
    Worked perfectly to solve this headache!

  • Vaibhav Agarwal Jul 13, 2011 @ 11:58

    Thanks a lot. Saved a lot of time just before an important demo…

  • jose luis Mar 10, 2012 @ 18:08

    Thank you very much for your information. it was very interesting for me to resolve my problem.

  • sanjay Jun 4, 2014 @ 6:11

    found this problem can you give a any solution
    #1030 – Got error 28 from storage engine

  • radouane Dec 20, 2014 @ 12:03

    Merci :)

  • Aravinda Aug 22, 2016 @ 4:58

    thank you so much. very useful page

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.