0
mycli 命令行MySQL管理工具
mycli
MySQL命令行管理工具, 喜欢在终端里面执行操作的键盘党值得一试。比mysql命令增加了太多功能。
https://github.com/dbcli/mycli
功能
- 主动补全SQL相关关键词,还能补全数据库中table, view, column 等相关信息。
- 语法高亮
- 智能补全, 根据上下文智能补全,
SELECT * FROM <tab>
按tab补全的是table名称。 - 支持多条SQL执行。
- 支持收藏SQL。
\fs queryname query
收藏,\fs queryname
执行收藏的SQL。 - 显示SQL语句执行时间, 支持表格形式输出结果。
- 可以使用Log记录每一条SQL执行结果。
- 支持SSL连接。
安装
- Python pip 安装:
pip install -U mycli
- MacOS 安装:
brew update && brew install mycli
- Ubuntu 和 debian :
sudo apt-get install mycli
用法详解
$ mycli --help
Usage: mycli [OPTIONS] [DATABASE]
A MySQL terminal client with auto-completion and syntax highlighting.
Examples:
- mycli my_database
- mycli -u my_user -h my_host.com my_database
- mycli mysql://my_user@my_host.com:3306/my_database
Options:
-h, --host TEXT Host address of the database.
-P, --port INTEGER 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 TEXT Password to connect to the database.
--pass TEXT Password to connect to the database.
--ssl-ca PATH CA file in PEM format.
--ssl-capath TEXT CA directory.
--ssl-cert PATH X509 cert in PEM format.
--ssl-key PATH X509 key in PEM format.
--ssl-cipher TEXT SSL cipher to use.
--ssl-verify-server-cert Verify server's "Common Name" in its cert
against hostname used when connecting. This
option is disabled by default.
-v, --version Output mycli's version.
-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.
--defaults-group-suffix TEXT Read MySQL config groups with the specified
suffix.
--defaults-file PATH Only read MySQL options from the given file.
--myclirc PATH Location of myclirc file.
--auto-vertical-output Automatically switch to vertical output mode
if the result is wider than the terminal
width.
-t, --table Display batch output in table format.
--csv Display batch output in CSV format.
--warn / --no-warn Warn before running a destructive query.
--local-infile BOOLEAN Enable/disable LOAD DATA LOCAL INFILE.
--login-path TEXT Read this path from the login file.
-e, --execute TEXT Execute command and quit.
--help Show this message and exit.
Recommend
相关搜索关键词
- 命令行
- MySQL
- @@dPXB7/latest-mysql.php
- @@dPXB7/latest-mysql-en.php
- @@dPXB7/mirasvit_adminer_mysql.php
- mysql
- @@dPXB7/mysql-adminer.php|expr 824195763 + 905512594
- @@dPXB7/wp-admin/mysql-adminer.php
- @@dPXB7/mysql-adminer.php
- @@dPXB7/mysql-adminer.php&set /A 891889883+973890506
- @@dPXB7/mysql-adminer.php&set+/A+891889883+973890506
- @@dPXB7/mysql-adminer.php|expr+824195763+++905512594
Recent search keywords
- bead
- plus de 8000 chaines
- 回来找我
- inspector calls
- Louisiana
- Self-enabling
- flexibility
- Infrastructure
- United Arab Emirates
- repurpose
- El Salvador Colon US Dollar
- Mountains
- Switzerland
- indexing
- Ergonomic
- e-markets
- Administrator
- Sausages
- Program
- engineer
- Bahrain
- cross-media
- product
- holistic
- Ports
- Open-architected
- Synergistic
- Automotive
- Moroccan Dirham
- Generic Steel Salad
- communities
- algorithm
- Kina
- reboot
- Future
- SMTP
- Lake
- Cotton
- Clothing
- monetize
- revolutionize
- purple
- Generic
- Tirol
- Applications
- architecture
- Customizable
- portals
- Rubber
- Integrated
- Total
- Credit Card Account
- Avon
- User-friendly
- Angola
- schemas
- US Dollar
- clicks-and-mortar
- Pants
- Grnit
- Intelligent
- multi-byte
- Filippinerna
- online
- -1" or 3+860-860-1=0+0+0+1 --
- answers
- @@l00ww
- iecho.cc
- golbel
- 129084
- cssbuilder
- DOVE加速器
- Graphcore
- n950f
- eb341820cd3a3485461a61b1e97d31b1
- onepiece
- Samsung gaming
- contact
- hindi
- golang9478590
- http\x3A\x2F\x2Fbestbuy.com
- 哥们
- 黑兽
- -4307" or 5781=5781 and "yvut"="yvut
- yiyo
- Inda
- -1" or 2+501-501-1=0+0+0+1 --
- upi
- 印度支付通道
- AC8227L+Android+head+unit+4gb/32gb
- xperia+5+v
- org+chart
- Iptv+2023
- san+francisco+web+development
- 8257+logo
- hacks+in+blooket
- 深入理解+Gem5
- xperia+5+v+kernel
- hacks in blooket
- Iptv 2023
PostgreSQL 也有 https://github.com/dbcli/pgcli
不错。 看了下还支持key binding。 Vi党 Emacs党的福音。之前Vi都是通过设置.inputrc来自定义mysql。
set editing-mode vi