jump to last post 1-2 of 2 discussions (4 posts)

MySQL said: Documentation (Errcode: 17)

  1. profile image57
    McKinneysposted 23 months ago

    MySQL said: Documentation (Errcode: 17)

    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.

  2. profile image57
    KristofLakatosposted 23 months 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

    1. profile image57
      KristofLakatosposted 23 months agoin reply to this

      You can still read this resource for more information on your issue.

    2. profile image57
      McKinneysposted 23 months agoin reply to this

      I am very grateful for your advice. Thank you very much! The issue has been resolved.)