Solved

MySQL ErrCode 17 - File Exists

Posted on 2007-04-11
10
908 Views
Last Modified: 2013-12-13
I have a Windows Server 2003, Apache 2.2.2 and MySQL 5.0.21 system with a complicated PHP Moodle site on top.

MYD files are being left in the tmp folder which is causing "Can't create/write to file C:\xampplite\tmp\#sql_xxxx_0.myd' errors.  I have searched the web and tried many things that have worked for other people. I've installed APC caching. I've run an Analyze, Check, Repair and Optimize on the tables. I've given Everyone Full Control to the folder. I've uninstalled McAfee.

This is an in-house server, so we have full access to the server, but no hosting support. Can anyone help, even if it's suggestions or something to check?
0
Comment
Question by:thill1982
10 Comments
 
LVL 24

Expert Comment

by:glcummins
ID: 18889525
Are .MYD files the only ones being left, or do you also see .MYI files in the tmp folder?

Is upgrading an option, if this is determined to be a bug with the MySQL version?
0
 

Author Comment

by:thill1982
ID: 18889616
If I keep a hawk eye on the folder I can sometimes catch MYI and MYD files appearing and disappearing as they are used. MYI files are never left behind though.

If it is a noted problem with .21 that is fixed with .37 then upgrading is a possibility. I'd rather avoid it otherwise as it's risking a semi-live server. I have not seen it mentioned in change logs though. Has anyone else?
0
 
LVL 24

Expert Comment

by:glcummins
ID: 18889652
This was a bug listed in an older version, but was supposedly fixed a long time ago: http://bugs.mysql.com/bug.php?id=11824

0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 24

Expert Comment

by:glcummins
ID: 18889687
Here is a description of the bug from that page:

Very complex select statements can create temporary tables
  that are too big to be represented as a MyISAM table.
 
  This was not checked at table creation time, but only at
  open time. The result was an attempt to delete the
  "impossible" table.
 
  But if the server is built --with-raid, MyISAM tries to
  open the table before deleting the files. It needs to find
  out if the table uses the raid support and how many raid
  chunks there are. This is done with an open "for repair",
  which will almost always succeed.
 
  But in this case we have an "impossible" table. The open
  failed. Hence the files were not deleted. Also the error
  message was a bit unspecific.


Does this sound like it fits your situation? If so, I would definitely recommend upgrading.
0
 

Author Comment

by:thill1982
ID: 18889799
Yes, although the symptons are slightly different in that both files were left behind. I'm only getting MYD files left.

The tables are MyISAM, and the server disks are RAIDed.
0
 

Author Comment

by:thill1982
ID: 18904540
Solution found! While I thought I had uninstalled McAfee, the EPO policy had reinstalled it, but not so you could see it in the system tray. Once I added the exception to the folder and instructed EPO not to over-write client exceptions everything worked as it should.
0
 

Author Comment

by:thill1982
ID: 19502803
Does Cleanup mean it will be deleted? Although I answered the question myself, this thread could help others in future.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 19503673
Try to read the comment?
I will leave the following recommendation for this question in the Cleanup topic area:
   PAQ with points refunded

Which means what it says: The question will be saved and the points will be refunded to you.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19539183
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now