MySQL Forums
Forum List  »  Performance

Re: #1 - Can't create/write to file 'C:\WINDOWS\TEMP\#sql_e7c_0.MYD' (Errcode: 17)
Posted by: Ron Scott
Date: August 26, 2007 12:12PM

Ok. I was having this problem since last night and have spent at least 5 hours searching the web, Google, forums, etc. trying to find a solution. Many of the solutions mentioned - turning off VIRUS Scan or excluding files (*.myd and *.myi) and temp folder. Other posts said that an error like this is caused by the temp folder not having the appropriate permissions.

This problem was happening on my notebook that I use to design and test my websites and it's been running fine for years. Nothing happened last night that would have changed my folder permissions and virus scan has been running on my notebook for the entire time without problem. My queries in my code haven't changed and even today they would work sometimes and not others - which (to me) ruled out virus scan and permissions being the issue.

Even though I knew everything was fine just 20 hours ago I decided to follow many of the suggestions to no avail. However, today I might have stumbled across the answer on my own. I say might because I haven't had a ton of time to retest it this afternoon for much more than 20 minutes but so far so good.

The possible cure for me was to DEFRAG my notebook's hard drive. I tend to do this every week - however with only 9% hard drive space free (5GB out of approx. 60GB) the defrag just doesn't do a great job. I defraged the drive 3 times - each time freeing up a bit more contiguous space. After doing this - and after removing any 0 byte .MYD or .MYI files that were left from when MySQL couldn't write or remove these files - my server began running smoothly again.

I though I would write this in order to help others that might not have found the solution to their "Can't create/write to file '#xxx.MYD' (Errcode: 17)" problem.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.