mysql常用命令
退出mysql: exit
查看mysql中有哪些数据库?
show database; 以英文的分号结尾
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| dbtest1 |
| dbtest2 |
| dbtest3 |
| information_schema |
| mybatis |
| mysql |
| performance_schema |
| school |
| stuinfosystem |
| sys |
| wesbos |
+--------------------+
mysql默认自带了四个数据库
怎样选择使用了某个数据库呢?
mysql> user test;
Database changed
正在使用一个名字叫test的数据库
怎样创建数据库呢?
mysql> create database bjppowernode;
Query OK, 1 row affected (0.03 sec)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| bjppowernode |
| dbtest1 |
| dbtest2 |
| dbtest3 |
| information_schema |
| mybatis |
| mysql |
| performance_schema |
| school |
| stuinfosystem |
| sys |
| wesbos |
+--------------------+
12 rows in set (0.00 sec)
标签:+--------------------+,哪些,数据库,常用命令,Database,mysql,show,schema From: https://www.cnblogs.com/sujiederezhi/p/17537107.html