報錯:mysql
mysql> drop database test;
ERROR 1010 (HY000): Error dropping database (can't rmdir './test/', errno: 17)sql
解決方法:ide
mysql> select @@datadir;
+-----------------+
| @@datadir |
+-----------------+
| /var/lib/mysql/ |
+-----------------+
1 row in set (0.00 sec)it
$ sudo cd /var/lib/mysql/test/
$ sudo rm -rf *class
再次執行刪除:
mysql> drop database test; test