0
Can't create/write to file '/tmp/#sql_77a8_0.MYD' (Errcode: 17) 

I'm getting this for all softs of select queries. This problem is quite intermittent. Deleting the file fixes the problem but in an hour or so it's back again.

Trying to restart the service occationally gives this error:

[14:57] root@host [/home/belntwk/all_sites]# service mysql restart Shutting down MySQL. ERROR! Manager of pid-file quit without updating file. ERROR! Failed to stop running server, so refusing to try to start. 

No idea what the problem is or even how to test if it has been fixed or not.

2
  • I should note that the /tmp folder is chmod 777 and there is ample disk space. Commented Nov 8, 2010 at 4:16
  • Here is a dump of mysql variables: pastebin.com/hGx6tuka Commented Nov 8, 2010 at 5:44

3 Answers 3

1

Sounds like a full /tmp to me

Or a permissions problem..

1
  • NB the /tmp filesystem should have the other sticky bit set (drwxrwxrwt) Commented Nov 8, 2010 at 9:31
0

Just do a killall mysqld.

For the real cause..... is your disk (or /tmp) full?

3
  • Nope, 400MB free. Commented Nov 8, 2010 at 4:16
  • grep /var/log/messages for SELinux. -- is SELinux blocking your mysqld? You should see message like SELinux is preventing mysqld (something) Commented Nov 8, 2010 at 4:35
  • No occurrences of 'SELinux'. Commented Nov 8, 2010 at 5:35
0

The temporary file "#sql_272_0.MYD" cannot be written to because it was not removed from a past session and unwrittable by the current session. It needs to be manually removed from the /tmp directory.

ssh into your server using the terminal, and enter the following command:

rm -f "/tmp/#sql_272_0.MYD"

Edit: make sure to execute the command as a user with permission to delete the file.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.