Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Sign In

Login to our W3Make Forum to ask questions answer people’s questions & connect with other people.

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

How to Fix “(Errcode: 28 – No space left on device)” – MySQL won’t start

How to Fix “(Errcode: 28 – No space left on device)” – MySQL won’t start

If you’re seeing the error message “No space left on device (28)” when trying to start up MySQL, it means that your database is taking up more space than is available on your server. To fix this, you’ll need to either delete some of your database’s files or increase the amount of storage space on your server. Once you’ve done that, MySQL should start up without any problems.

– Check your storage: Is there actually free space on the device?

If you’re noticing that your device is running slowly, one of the first things you should check is your storage space. If there’s not much free space left on the device, that can definitely contribute to slower performance. So take a look at how much storage you have left and see if that’s the issue. If it is, you can try deleting some files or apps that you don’t need to free up some space.

– Check for any active storage processes that may be using up space.

If you’re noticing that your storage space is filling up quickly, it’s a good idea to check for any active storage processes that may be using up space. You can do this by opening the Activity Monitor application and looking for any processes that are using a lot of storage space. If you find any, you can either quit the process or delete the associated files to free up space.

– Check for any corrupt files that may be taking up space.

If you’re noticing that your computer is running slower than usual, one potential culprit could be corrupt files. These files can take up valuable space on your hard drive, and can cause your computer to slow down. To check for corrupt files, you can use a tool like Windows Disk Cleanup. This will scan your hard drive for any files that are no longer needed or are corrupt, and give you the option to delete them.

I would recommend starting with the following commands:

First check how much space you have available and which partition is filling up with the following command:

df -h

The output would look something like this:

Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           395M  1.8M  393M   1% /run
/dev/vda1        40G   36G   4G   90% /

Then depending on the partition which is filling up you could use the following command to find any files that are larger than 400MB for example:

sudo find / -type f -size +400M -exec ls -lh {} \;

The output should look something like:
-rw-r--r-- 1 root root 1.6G June 12 15:43 /home/user1/large-file.txt
-rw-r--r-- 1 root root 1.6G June 12 15:42 /home/bobby/large-file.txt
-rw-r--r-- 1 root root 1.6G June 12 15:43 /home/bobby/public_html/wp-content/core.dump
-rw-r--r-- 1 root root 1.6G June 12 15:42 /home/bobby/public_html/error_log

Clean up binlog.###### files in /var/lib/mysql directory?

Run the following commands to temporarily reclaim the disk space.

mysql -uroot -ppassword

PURGE BINARY LOGS BEFORE '2022-10-21 22:00:00';

Note: You can change the date from the date of your choice.

Running the above gave me over 20 GB back, with the /var/lib/mysql directory taking up just over 900 MB now instead fo the 19 GB.

Of course, I expect this will be an issue going forward still and will need to find a more permanent solution like increase your disk size.

1 Comment

Leave a comment

You must login to add a new comment.