ERROR 6 (HY000): ERROR ON DELETE OF ‘./DATABASE//DB.OPT’ (ERRCODE: 13)

I was trying to drop a database in MySQL today but every time I did I got the error:

ERROR 6 (HY000): Error on delete of './database//db.opt' (Errcode: 13)

This was due to the fact permissions on the database folder were not allowing MySQL to delete the folder.

There are a couple of ways you can fix this, either through the command line by finding the folder in question and changing the permissions to allow the MySQL user permissions, or through your FTP application, I am using WinSCP. Simply navigate to where you store your MySQL databases, right click on the folder in question and set the MySQL user to have read, write and execute permissions. You will now be able to drop the database.

总结起来就一句话,看看mysql的数据目录权限。

你可能感兴趣的:(error,6,hy000)