54Views2Replies

Author Options:

MySQL said: Documentation (Errcode: 17)? Answered

I have several mySQL databases on a dedicated server that appear to be corrupt. I am getting the error:

MySQL said: Documentation
#1 - Can't create/write to file '#sql_e6e_0.MYD' (Errcode: 17)

when I try to access any table in any database. I can export the data and it looks ok, but when I delete the table and import it back I still get the error.

If there is a way to fix this please provide me with step by step instructions.

Discussions

0
KristofLakatos
KristofLakatos

3 years ago

Something on this server is not clearing out the temp directory on a
regular basis. Tell your host to empty that directory. Usually the files
are created in /tmp (On *nix based systems)




It's pretty obscure, but I think you might (just
might) have a dead SQL temporary table like that one hanging around, and
eventually mysqld tries to reuse the same filename and fails because it has
internal rules telling it never to overwrite a .MYD.



What I would recommend is looking to see where
these #sql_XXXX_X.MYD files live, shut down mysqld, clean out the temp files
and restart it.

SSH into the server and type



service mysql stop



delete the #sql_XXXX_X.MYD files



service mysql start

Or if this
doesn't solve the problem try to completely recover the database (for example
using MySql Recovery Toolbox) and run the base again. http://www.oemailrecovery.com/mysql_recovery.html