Report this

What is the reason for this report?

Can't create/write to file '/tmp/#sql_1f98_0.MYI' (Errcode: 28)

Posted on February 28, 2018

Hi, our Wordpress installation is getting this issue and returning this message:

Can’t create/write to file ‘/tmp/#sql_1f98_0.MYI’ (Errcode: 28)

Can someone help with this?

Kind regards



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

By default the /tmp directory is writable by all and files in this directory are usually deleted on reboot. This error could indicate one of the following:

  • Somehow permissions on this file or on your /tmp directory were changed and the MySQL process no longer has permission to write the file it needs.
  • For some reason the service is being blocked from writing to the file, possible if there is an existing process already running.
  • Your disk has run out of space preventing the service from writing the file it needs.

I would recommend first rebooting your droplet. This should clear most if not all of the contents of /tmp and get rid of any hanging processes. If this does not resolve the issue, make sure the permissions and ownership of /tmp is correct.

Hello i’ve got the same issue we can’t connect to the database anymore;

It is most probably the system is ran out of inodes. In my case PHP sessions are the issue. Check the inodes by run df -i Solution : rm -rf /var/lib/php/sessions/ mkdir /var/lib/php/sessions/ && chmod 1733 /var/lib/php/sessions/ Another reference: http://www.queryadmin.com/1634/bash-script-delete-php-session-files-free-inodes/

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.