Error Codes > 17

Categories

Error Codes, Server Error Codes

Definition

Error 17 indicates that that either the MySQL server encountered an issue while trying to delete the directory containing the database to be dropped, or tried to create a temporary file that already existed during an ALTER TABLE statement.

Sample

mysql> DROP DATABASE foo;
Error dropping database (can’t rmdir ‘./foo/’, errno: 17)

mysql> ALTER TABLE foo …
Error on rename of ‘./bar/foo.frm’ to ‘./bar/B-foo.frm’ (Errcode: 17)

Resolution

  • Check that the user the MySQL server is running under has permission to delete the directory.
  • Check that there are no files in the directory that are not created by the MySQL server.
  • Browse to the MySQL data directory and delete all files whose names start with A- or B-.
  • Shut down MySQL, manually delete the directory listed.
  • Use the latest version of MySQL.
  • Use the mysqld-nt binaries when using Windows NT-based hosts.

Further Reference

Bug report related to Error 17 on bugs.mysql.com

perror - Explain Error Codes (MySQL Reference Manual)

Problems with ALTER TABLE (MySQL Reference Manual) 

Leave a Reply