If you get this error message when you are tying to drop a MySQL database say my_database then the reason for this is File Permissions (Error code 13).
Whenever we crate a database, a directory is created under mysql/var/ ( XAMPP : XAMPP/xamppfiles/mysql/var/) with the same name as that of your database, this directory contains a file called db.opt which contains metadata related to the database.
OK! but Why this error ? : All MySQL related files are stored in your filesystem, if you try to DROP the database, the corresponding db.opt and the db directory is to be deleted but it maybe so that you do not have permissions to delete directories and files.
How can I get Access to delete db.opt file and hence the database :
Code2care'smission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.