饿虎岗资源网 Design By www.oxmxm.com

查看数据库

show databases;

创建数据库

create DATABASE 数据库名称

create DATABASE databasetest;

选择数据库

use 数据库名称

use databasetest;
------------
Database changed;切换成功

查看当前数据库名称

SELECT DATABASE();

删除数据库

drop DATABASE 数据库名称

drop DATABASE databasetest;

数据库状态

status;
--------------
mysql Ver 14.14 Distrib 5.7.17, for Win64 (x86_64)
Connection id:     5
Current database:
Current user:      root@localhost
SSL:          Not in use
Using delimiter:    ;
Server version:     5.7.17-log MySQL Community Server (GPL)
Protocol version:    10
Connection:       127.0.0.1 via TCP/IP
Server characterset:  utf8
Db   characterset:  utf8
Client characterset:  gbk
Conn. characterset:  gbk
TCP port:        3306
Uptime:         2 hours 25 min 34 sec
Threads: 2 Questions: 57 Slow queries: 0 Opens: 114 Flush tables: 1 Open tables: 107 Queries per second avg: 0.006
--------------

饿虎岗资源网 Design By www.oxmxm.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
饿虎岗资源网 Design By www.oxmxm.com