2

Server Configuration:

MySQL 5.051a-community-nt-log Community Edition installed on Windows Server 2003 Standard Edition SP1.

This MySQL Server is part of a client's WAMP installation

Problem:

MySQL was originally using the C:\WINDOWS\TEMP directory for temp files. From time to time, the client would get the following error when trying to access data in a table in phpMyAdmin.

"#1 - Can't create/write to file 'C:\WINDOWS\TEMP\#sql_1760_0.MYD' (Errcode: 17)".

Which would require a restart of MySQL to fix.

Thinking this might be a problem with using the C:\WINDOWS\TEMP directory, I created another directory that the MySQL service had read/write access to and pointed tmpdir to that directory in my.cnf.

tmpdir=e:/Program Files/wamp/bin/mysql/mysql5.0.51a/tmp

I restarted MySQL and accessing tables from phpMyAdmin worked fine for one entire day and then the following morning, phpMyAdmin started complaning about the same error.

Investigation:

There is more than enough disk space on both the C: and E: drives

Not seeing any other errors from MySQL.

Window's application logs don't mention anything about the error.

No information in MySQL's logs

Database in question is a mix of MyISAM and InnoDB tables.

I have not yet veririfed, if the inaccessible tables are only the ones in MyISAM.

Questions:

Has anyone seen this problem before with a WAMP MySQL 5.0 installation and know what might be causing it and or how to resolve this error?

asked Dec 17, 2012 at 12:16
3
  • Have you tried excluding the directory from virus scanning? Seems to be the main cause of this Commented Dec 17, 2012 at 12:18
  • Hi Phil, that's probably the answer as a virus scanner was recently installed. If you add your answer below I will check it off as correct once I've confirmed. Commented Dec 17, 2012 at 12:31
  • Thanks Phil, I'll let you know as soon as I'm sure excluding the directory resolved the problem. Commented Dec 17, 2012 at 14:09

1 Answer 1

1

The most common cause of this is virus scanning, as virus scanners tend to lock files.

Try excluding the directory from scanning.

answered Dec 17, 2012 at 12:59
2
  • I have heard of this legend. Beware of legends that are true. +1 !!! Commented Dec 17, 2012 at 19:49
  • Thanks again Phil, no reports of problems this morning. Commented Dec 18, 2012 at 9:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.