1.MySQL的数据库说明
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema | #mysql内置信息
| kings | #自己创建
| mysql | #存储mysql的用户信息,授权等
| performance_schema | #mysql存储性能相关的数据
| test |
+--------------------+
5 rows in set (0.00 sec)
2.查看指定的数据库
mysql> show databases like 'k%';
+---------------+
| Database (k%) |
+---------------+
| kings |
+---------------+
1 row in set (0.00 sec)
3.查看指定数据库的表
mysql> show tables from mysql;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| event |
| func |
| general_log |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| innodb_index_stats |
| innodb_table_stats |
| ndb_binlog_index |
| plugin |
| proc |
| procs_priv |
| proxies_priv |
| servers |
| slave_master_info |
| slave_relay_log_info |
| slave_worker_info |
| slow_log |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
28 rows in set (0.00 sec)
4. 注意mysql默认关键字大小写不敏感,但数据表是严格区分大小写的