MySQL tables and databases cannot be deleted, and the tables cannot be opened or exported.

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.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325557801&siteId=291194637