MySQL Error Code 17?
I don't usually like to post asking for help, but over the last few weeks I've seen some variation of the following error on my server:
Can't create/write to file '#sql_5c90_0.MYD' (Errcode: 17)
The file name is usually different, but the Errcode (17) is always the same. A quick google search shows that MySQL error code 17 means that the file exists (so it can't be overwritten), but nothing I've found tells me a.) what the heck the file is or b.) why it already exists or c.) how to make sure it doesn't exist the next time the process tries to write to it.
Any MySQL gurus out there have an idea? If I do the good old 'reboot' the problem goes away (for a few days/hours anyways).



-or-
b) In older versions of MySQL this can be caused by the antivirus software on your server locking the files.
I'm not sure about if writing a batch process will help or not because I'm not sure exaclty why or how often MySQL tries to create these files with the same name. so trying to schedule something may not be practicle. I only that some "unknown to me" circumstance causes it to try to create these .MYD files that already exists and you have to delete the file from the temp folder to get it to work again.
This would be NTFS permissions or any AntiVirus software etc.
I would suggest to create a tmp directory under the MySQL directory and define this directory in my.ini for the parameter tmpdir.
If you have any AntiVirus software please try to add MySQL directory into exclude list.