≡ Menu

CPanel: MySQL Error: Can't create/write to file /tmp/

If got message like MySQL Error: 1 (Can’t create/write to file ‘/tmp/#sql_7425_0.MYD’ (Errcode: 17)) or Warning: session_write_close(): write failed: No space left on device

you can check:

  • Make sure that /tmp isn’t out of space
  • Make sure that /tmp is chmod 1777
  • If you’re using a virtual /tmp partition (/tmpDSK) make sure it’s not corrupt – if so replace it

If your /usr/tmpDSK is corrupted. You should stop all processes that have files open on /tmp such as MySQL and other applications using:

/usr/sbin/lsof /tmp

Delete all un-necessary files and then run the following command:

/scripts/securetmp
{ 0 comments… add one }

Leave a Comment

*