Mysql

mysql USER不清楚什麼可以刪除?

  • December 14, 2013

當下面列出我創建的數據庫時show databasesinformation_schema其中列出的“使用者”和“mysql”是什麼?

我不知道是很久以前我犯了一個錯誤並創建了它們,還是它們是預設列表,揭示了一些東西?

預設情況下,您的機器上應該有 mysql 數據庫,並且 mysql 數據庫應該有以下表:

mysql> show tables;
+---------------------------+
| Tables_in_mysql           |
+---------------------------+
| columns_priv              |
| db                        |
| event                     |
| func                      |
| general_log               |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| ndb_binlog_index          |
| plugin                    |
| proc                      |
| procs_priv                |
| proxies_priv              |
| servers                   |
| slow_log                  |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
+---------------------------+
24 rows in set (0.00 sec)

您還應該擁有以下數據庫:

mysql> show databases;
+---------------------+
| Database            |
+---------------------+
| information_schema  |
| performance_schema  |
| mysql               |
+---------------------+

引用自:https://unix.stackexchange.com/questions/97771