In mysql on linux, I recently encountered a situation where tables and libraries could not be deleted, and tables could not be opened or exported.
While dropping the database, I get the following error:
ERROR 1010 (HY000): Error dropping database(can’t rmdir ‘./data’,errno:39)
Solution:
Delete the files in the mysql directory directly
Because the files of mysql in linux exist by default in /var/lib/mysql/
With root privileges, switch to this directory
Use the command: cd /var/lib/mysql/
Find the data database directory to delete
Use the command: rm -r -R data
At this point, the database has been successfully deleted.