天天看點

mysql擷取幫助

檢視配置參數:

SHOW VARIABLES LIKE '%timeout%'

2)MySQL用戶端工具自帶的幫助

?     (\?) Synonym for `help'. 

clear   (\c) Clear the current input statement.               --清除目前輸入的語句

connect  (\r) Reconnect to the server. Optional arguments are db and host.  --重新連接配接,通常用于被剔除或異常斷開後重新連接配接,

delimiter (\d) Set statement delimiter.                    --設定指令終止符,預設為;,比如我們可以設定為/來表示語句結束 

edit   (\e) Edit command with $EDITOR.                   --編輯緩沖區的上一條SQL語句到檔案,預設調用vi,檔案會放在/tmp路徑下

ego    (\G) Send command to mysql server, display result vertically.    --控制結果顯示為垂直顯示

exit   (\q) Exit mysql. Same as quit.                   --退出mysql

go    (\g) Send command to mysql server.                 --發送指令到mysql服務

help   (\h) Display this help.

nopager  (\n) Disable pager, print to stdout.                --關閉頁設定,列印到标準輸出  

notee   (\t) Don't write into outfile.                   --關閉輸出到檔案

pager   (\P) Set PAGER [to_pager]. Print the query results via PAGER.    --設定pager方式,可以設定為調用more,less等等,主要是用于分頁顯示

print   (\p) Print current command.           

prompt  (\R) Change your mysql prompt.                   --改變mysql的提示符 

quit   (\q) Quit mysql.                             

rehash  (\#) Rebuild completion hash.                    --自動補齊相關對象名字  

source  (\.) Execute an SQL script file. Takes a file name as an argument. --執行腳本檔案

status  (\s) Get status information from the server.            --獲得狀态資訊

system  (\!) Execute a system shell command.                --執行系統指令   

tee    (\T) Set outfile [to_outfile]. Append everything into given outfile.--操作結果輸出到檔案 

use    (\u) Use another database. Takes database name as argument.     --切換資料庫

charset  (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets. --設定字元集

warnings (\W) Show warnings after every statement.              --列印警告資訊

nowarning (\w) Don't show warnings after every statement.

3、服務端的相關幫助

繼續閱讀