查看數(shù)據(jù)庫
show databases;
創(chuàng)建數(shù)據(jù)庫
create DATABASE 數(shù)據(jù)庫名稱
create DATABASE databasetest;
選擇數(shù)據(jù)庫
use 數(shù)據(jù)庫名稱
use databasetest;
------------
Database changed;切換成功
查看當(dāng)前數(shù)據(jù)庫名稱
SELECT DATABASE();
刪除數(shù)據(jù)庫
drop DATABASE 數(shù)據(jù)庫名稱
drop DATABASE databasetest;
數(shù)據(jù)庫狀態(tài)
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
--------------
您可能感興趣的文章:- MySQL事務(wù)的基礎(chǔ)學(xué)習(xí)以及心得分享
- MySQL中表子查詢與關(guān)聯(lián)子查詢的基礎(chǔ)學(xué)習(xí)教程
- MySQL中觸發(fā)器的基礎(chǔ)學(xué)習(xí)教程
- Mysql基礎(chǔ)入門 輕松學(xué)習(xí)Mysql命令
- 學(xué)習(xí)mysql之后的一點總結(jié)(基礎(chǔ))
- 快速學(xué)習(xí)MySQL基礎(chǔ)知識