您好,登錄后才能下訂單哦!
mysql 是一個(gè)簡(jiǎn)單的sql shell,它可以用來管理mysql數(shù)據(jù)庫(kù)。
此命令的適用范圍:RedHat、RHEL、Ubuntu、CentOS、Fedora。
1 、語(yǔ)法
mysql [options] db
2 、參數(shù)列表
選項(xiàng) |
說明 |
- ? | --help |
顯示幫助信息 |
--auto-rehash |
激活自動(dòng)rehash功能 |
--bind-address = ip |
綁定ip,當(dāng)電腦有多個(gè)網(wǎng)卡的時(shí)候,可以指定mysql連接時(shí)的網(wǎng)卡 |
--character-sets-dir = path |
指定字符集所在的目錄 |
--column-names |
在結(jié)果中顯示列名 |
-C | --comments |
在發(fā)送給服務(wù)器的狀態(tài)中顯示注釋 |
-c | --compress |
在服務(wù)器和客戶端之間的數(shù)據(jù)進(jìn)行壓縮 |
-D db | --database = db |
指定數(shù)據(jù)庫(kù)名 |
--default-character-set = chatset |
默認(rèn)的字符集 |
-e statement | --execute = statement |
指定要使用的指令 |
-f | --force |
強(qiáng)制執(zhí)行 |
-H | --html |
輸出html格式 |
-i | --ignore-spaces |
忽略空格 |
--line-numbers |
為錯(cuò)誤信息顯示行號(hào) |
--local-infile=0|1 |
關(guān)閉或者開啟LOAD DATA INFILE功能 |
-A | --no-autp-rehash |
關(guān)閉自動(dòng)rehash功能 |
-b | --no-beep |
關(guān)閉出錯(cuò)提醒 |
-p password | --password = |
連接數(shù)據(jù)庫(kù)使用的密碼 |
-W | --pipe |
使用有名管道連接數(shù)據(jù)庫(kù) |
-P port | --port = |
連接數(shù)據(jù)庫(kù)使用的端口 |
-- protocol = TCP|SOCKET|PIPI|MEMORY |
連接數(shù)據(jù)庫(kù)使用的協(xié)議 |
-q | --quick |
不緩存查詢結(jié)果 |
-s | --silent |
輸出簡(jiǎn)短的內(nèi)容 |
-v | --verbose |
顯示詳細(xì)執(zhí)行過程 |
-V | --version |
顯示版本信息 |
-w | --wait |
等待時(shí)間 |
-X | --xml |
產(chǎn)生xml輸出 |
-u user | --user = |
連接數(shù)據(jù)庫(kù)的用戶名,默認(rèn)是rootq |
3 、實(shí)例
1 )登錄
|
2 )查看權(quán)限
|
做了一個(gè)Linux學(xué)習(xí)的平臺(tái),目前出來一個(gè)雛形,各位可以參考使用
鏈接:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ 密碼:n7bk
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。