Commands

Introduction

Mycli sends most input you enter to the MySQL server as a SQL statement. There is also a set of commands that mycli will accept. To see these, type help or \? at the prompt:

mycli>help
+-------------+----------------------------+------------------------------------------------------------+
|Command|Shortcut|Description|
+-------------+----------------------------+------------------------------------------------------------+
|\G|\G|Displaycurrentqueryresultsvertically.|
|\dt|\dt[+][table]|Listordescribetables.|
|\e|\e|Editcommandwitheditor(uses$EDITOR).|
|\f|\f[name [args..]]|Listorexecutefavoritequeries.|
|\fd|\fd[name]|Deleteafavoritequery.|
|\fs|\fsnamequery|Saveafavoritequery.|
|\l|\l|Listdatabases.|
|\once|\o[-o]filename|Appendnextresulttoanoutputfile(overwriteusing-o).|
|\timing|\t|Toggletimingofcommands.|
|connect|\r|Reconnecttothedatabase.Optionaldatabaseargument.|
|exit|\q|Exit.|
|help|\?|Showthishelp.|
|nopager|\n|Disablepager,printtostdout.|
|notee|notee|Stopwritingresultstoanoutputfile.|
|pager|\P[command]|SetPAGER.PrintthequeryresultsviaPAGER.|
|prompt|\R|Changepromptformat.|
|quit|\q|Quit.|
|rehash|\#|Refreshauto-completions.|
|source|\.filename|Executecommandsfromfile.|
|status|\s|Getstatusinformationfromtheserver.|
|system|system[command]|Executeasystemshellcommmand.|
|tableformat|\T|Changethetableformatusedtooutputresults.|
|tee|tee[-o]filename|Appendallresultstoanoutputfile(overwriteusing-o).|
|use|\u|Changetoanewdatabase.|
|watch|watch[seconds][-c]query|Executesthequeryevery[seconds]seconds(bydefault5).|
+-------------+----------------------------+------------------------------------------------------------+

Most commands have a long and short form. Most of the commands are case sensitive. Commands may be followed by an optional semicolon.

Sponsors

Nova Kid School

blogroll

social

AltStyle によって変換されたページ (->オリジナル) /