mySql的常用指令 一、登入mySql的方式 mysql -hhostname -uroot -ppassword Example: mysql -uroot -proot -h10.10.10.10 二、離線指令 quit \q 三、顥示連結的狀態 status 四、建立資料庫 create database 資料庫名稱; 五、刪除資料庫 drop database 資料庫名稱; 六、show 出資料庫 show databases; 七、檢查使用中的資料庫 select database(); 八、使用資料庫 use 資料庫名稱; 九、顯示資料庫內的資料表名稱 show tables; 十、顯示資料庫欄位名稱及內容 describe 資料表名稱; 十一、查看mysql的目前有那些在執行 show processlist; 十二、顯示索引表 show index 資料表名稱; 十三、匯入資料 mysql -uroot -p 資料庫<資料檔名.sql

 

文章標籤
全站熱搜
創作者介紹
創作者 PG Levin Li 的頭像
PG Levin Li

程式開發學習之路

PG Levin Li 發表在 痞客邦 留言(0) 人氣(524)