MariaDB10.6にデータベースの一覧を確認する

1.データベースの一覧
書式
SHOW {DATABASES | SCHEMAS}
[LIKE 'pattern’ | WHERE expr]
操作例

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
| test2db            |
| test3db            |
| testdb             |
+--------------------+
7 rows in set (0.003 sec)

2.CREATE DATABASE文を確認
書式
SHOW CREATE {DATABASE | SCHEMA} データベース名
操作例

MariaDB [(none)]> show create database testdb;
+----------+--------------------------------------------------------------------+
| Database | Create Database                                                    |
+----------+--------------------------------------------------------------------+
| testdb   | CREATE DATABASE `testdb` /*!40100 DEFAULT CHARACTER SET utf8mb3 */ |
+----------+--------------------------------------------------------------------+
1 row in set (0.001 sec)

 

MariaDB

Posted by arkgame