1、建立資料庫:create Database databaseName;例如需要建立mysqlTest資料庫,create Database mysqlTest;
![](https://img.php.cn/upload/article/000/000/194/12b5c9c38edefeb6f7ddf39e7eeaf2a1-1.png)
![](https://img.php.cn/upload/article/000/000/194/12b5c9c38edefeb6f7ddf39e7eeaf2a1-3.png)
![](https://img.php.cn/upload/article/000/000/194/8ee19ca40feab9512e20c5fd4249b2bf-5.png)
![](https://img.php.cn/upload/article/000/000/194/8ee19ca40feab9512e20c5fd4249b2bf-6.png)
![](https://img.php.cn/upload/article/000/000/194/7a0acaacfb0ec896a57d290baa08fd45-8.png)
由此還可以看出,這裡的名稱是不分大小寫的,據我所知可以透過設定設定為全大些或全小寫。 ![](https://img.php.cn/upload/article/000/000/194/7a0acaacfb0ec896a57d290baa08fd45-10.png)
2、檢視系統中已經存在的資料庫:show databases;
3、選擇資料庫:use databaseName;(本文所有databaseName皆是一個代稱,表示資料庫名稱,tableName也是代稱,表示表名);
![](https://img.php.cn/upload/article/000/000/194/37f8756acdbe7a420221bf76b5fd80ed-12.png)
4、刪除資料庫: drop database databaseName;
5、檢視資料庫引擎:show engines \G![](https://img.php.cn/upload/article/000/000/194/aa7314f531ed61a8a46bc00910641eaa-15.png)
#支持的引擎比較多,因此這裡截圖就不完整。
6、檢視資料庫預設儲存引擎:show variables like 'storage_engine%';
![](https://img.php.cn/upload/article/000/000/194/06f9083fc7241fe9c399970751cafe0d-18.png)
##7 、檢視系統說明:help contents;
8、建立表格:create table tableName(
### 屬性名稱資料類型,#### ## 屬性名稱資料類型,###### ......######)###############9、檢視表格結構:describe tableName; ###########################10、刪除表:drop table tableName;############## #### 以上就是mysql常用基礎操作語法(一)~~對庫的操作【指令列模式】的內容,更多相關內容請關注PHP中文網(www.php.cn)! ################