MySQL 创建数据库

时间:2021-10-26 22:16:15

参考:MySQL:创建、修改和删除表

 

查看数据库

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| java505            |
| mysql              |
| performance_schema |
| sakila             |
| sys                |
| world              |
+--------------------+
7 rows in set (0.00 sec)

 

创建数据库

mysql> CREATE DATABASE Java407;
Query OK, 1 row affected (0.00 sec)

 

查看数据库

mysql> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| java407            |
| java505            |
| mysql              |
| performance_schema |
| sakila             |
| sys                |
| world              |
+--------------------+
8 rows in set (0.00 sec)