英文:MyCli
譯者:伯樂線上-黃利民
網址:http://hao.jobbole.com/mycli-mysql/
點選“閱讀原文”可檢視本文網頁版
簡介
MyCli 是一個 MySQL 命令列工具,支援自動補全和語法高亮。也可用於 MariaDB 和 Percona。
截圖展示
動圖展示
Quick Start
如果你已會安裝 Python 包,那就簡單了:
$ pip
install
mycli
如果你是在 OS X 平臺,那就用 homebrew:
$ brew
install
mycli
用例
$ mycli --help
Usage: mycli [OPTIONS] [DATABASE]
Options:
-h, --host TEXT Host address of the database.
-P, --port TEXT Port number to use
for
connection. Honors
$MYSQL_TCP_PORT
-u, --user TEXT User name to connect to the database.
-S, --socket TEXT The socket
file
to use
for
connection.
-p, --password Force password prompt.
--pass TEXT Password to connect to the database
-
v
, --version Version of mycli.
-D, --database TEXT Database to use.
-R, --prompt TEXT Prompt
format
(Default:
"\t \u@\h:\d> "
)
-l, --logfile FILENAME Log every query and its results to a
file
.
--help Show this message and
exit
.
示例
$ mycli local_database
$ mycli -h localhost -u root app_db
$ mycli mysql:
//amjith
@localhost:3306
/django_poll