0

得到這個奇怪的錯誤發生我想清理我沒有使用我的數據庫。然而,當我嘗試刪除mysql它說數據庫dosnt存在,但是我可以使用它!奇怪還是什麼?!任何方式來從我的列表中擺脫這個數據庫。試圖放棄數據庫,但說數據庫dosnt存在,甚至認爲我可以使用它

mysql> show databases; 
+--------------------+ 
| Database   | 
+--------------------+ 
| information_schema | 
| mysql    | 
| performance_schema | 
| test    | 
+--------------------+ 
4 rows in set (0.00 sec) 

mysql> use test; 
Database changed 
mysql> drop mysql; 
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql' at line 1 
mysql> drop database mysql; 
ERROR 1146 (42S02): Table 'mysql.proc' doesn't exist 
mysql> create database mysql; 
ERROR 1007 (HY000): Can't create database 'mysql'; database exists 
mysql> 

回答

6

這是一個包含用戶等的特殊數據庫,你不應該刪除它,MySQL不會讓你。

0

mysql數據庫保存用戶,權限,數據庫信息和其他東西。它不能被刪除。如果你設法通過刪除它的關聯文件來刪除它,你的mysql實例將停止運行。

相關問題