show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| datapass_schema |
| mysql |
| test |
+--------------------+
4 rows in set (0.05 sec)
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
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 |
| servers |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
23 rows in set (0.00 sec)
mysql> create user m identified by 'm';
Query OK, 0 rows affected (0.02 sec)
檢查數據庫mysql和table用戶如上所示,如果該dosent工作,您的MySQL安裝不正確。
使用下面的命令中提到的其他職位重新安裝表
mysql_install_db
你可以先看看這個鏈接:http://dev.mysql.com/doc/refman/5.1/en/create-table.html –
在我的情況,一切都完好無損(表'mysql'有沒有*損壞*或*丟棄*)我正在嘗試從SELECT命令** mysql.user'從命令行** **而MySQL的工作臺**正在運行的用戶和權限部分打開(基本上mysql.user表已被'MySQL-Workbench'鎖定*)。關閉工作臺解決了這個問題。我觀察到,反過來也是如此:如果我從'shell'以'root'身份登錄,然後嘗試導航到Workbench上的'Users和Privilege'部分,則會失敗。 –