データベース一覧
mysql> show tababases;
+----------+
| Database |
+----------+
| mysql |
| test |
+----------+
2 rows in set (0.01 sec)
データベースの選択
mysql> use test;
Database changed
テーブルの一覧
mysql> show tables;
Empty set (0.00 sec)
testには、テーブルが無いという事です。
実際にテーブルがあるものは、
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 |
| func |
| host |
| tables_priv |
| user |
+-----------------+
6 rows in set (0.00 sec)
のように、表示されます。