Solved

MySQL ErrCode 17 - File Exists

Posted on 2007-04-11
10
903 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

760 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

22 Experts available now in Live!

Get 1:1 Help Now