mysql命令行爱好者必备工具mycli
mycli
MyCLI is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.
- Source: https://github.com/dbcli/mycli
- Chat: Gitter
- Mailing List: https://groups.google.com/forum/#!forum/mycli-users
Quick Start
If you already know how to install python packages, then you can simply do:
$ pip install mycli
If you're on macOS you can install it via homebrew.
$ brew update && brew install mycli
If you're having trouble with the quick start, check the install page for detailed instructions.
Usage
$ 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.
-v, --verbose Verbose output.
-D, --database TEXT Database to use.
-d, --dsn TEXT Use DSN configured into the [alias_dsn]
section of myclirc file.
--list-dsn list of DSN configured into the [alias_dsn]
section of myclirc file.
-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.
blogroll
mysql命令行爱好者必备工具mycli的更多相关文章
- 用批处理启动MySQL命令行工具
最近在看MySQL,安装好之后,每次在开始菜单去启动MySQL命令行工具的时候,都是直接用root用户连接我本地的数据库 输入密码开始工作,但是要连接服务器上的MySQL的话,就要去CMD下运行 : ...
- [MySQL]命令行工具和基本操作
[MySQL]命令行工具和基本操作 一 MySQL命令行工具 (查看帮助 ---help,或 -?) 1)MySQL MySQL是一个简单的SQL外壳(有GNU readline功能).它支持交互式 ...
- Mysql 命令行工具
1.Mysql命令行工具分为两类:服务端命令行工具和客户端命令行工具. 2.服务端工具 mysql_install_db:建库工具 mysqld_safe:Mysql服务的启动工具,mysqld_sa ...
- MySQL命令行工具各功能说明(转)
MySQL 服务器端使用工具程序 mysqld - SQL 后台程序(即 MySQL 服务器进程).该程序必须启动运行,才能连接服务器来访问数据库. mysqld_safe - 服务器启动脚本,可以通 ...
- MYSQL 命令行工具自动登录的方法
MYSQL 命令行工具自动登录的方法 1. 需求提出 由于在linux 环境下,经常需要使用mysql(command-line tool) 终端连接到MYSQL DB服务. 其中大致的语法如下: m ...
- MySQL命令行导出、导入数据库,备份数据库表
MySQL导出数据库/数据表 1.首先,将你MySQL安装目录,例如C:\Program Files\MySQL\MySQL Server 5.7\bin添加到你的系统环境变量PATH中: 2.导出数 ...
- MySQL命令行登录的例子
环境:MySQL Sever 5.1 + MySQL命令行工具 问题:MySQL命令行登录 解决: 命令 行登录语法: mysql –u用户名 [–h主机名或者IP地址] –p密码 说明:用户名是你登 ...
- mysql命令行导入sql脚本中文变问号问题
之前一直用工具连接mysql虽然小问题不断也都无伤大雅,最近做金融云项目,只能通过服务器的内网访问数据库,也就是说只能在linux下通过命令行访问,在导入中文的时候发现都变成问号了,经过查询资料解决, ...
- mysql 命令行操作入门(详细讲解版)
之前分享过多次Mysql主题,今天继续分享mysql命令行入门 1. 那么多mysql客户端工具,为何要分享命令行操作? -快捷.简单.方便 -在没有客户端的情况下怎么办 -如果是mysql未开启 ...
随机推荐
- GO:interface
一.感受接口 type Usb interface { Connect() Disconnect() } // 手机 type Phone struct {} // 相机 type Camera st ...
- Python运维工程师
1.单引号,双引号,三引号的区别. 2.Python里面如何实现tuple和List的转换. 3.Python的参数传递是值传递还是引用传递,举例说明Python函数参数传递的几种形式,并说明函数传参 ...
- oracle中的权限管理
connect resource权限 grant connect,resource to user; 执行上面的sql语句后用户包括的权限: CONNECT角色: --是授予最终用户的典型权利,最基本 ...
- spring boot学习01【搭建环境、创建第一个spring boot项目】
1.给eclipse安装spring boot插件 Eclipse中安装Spring工具套件(STS): Help -> Eclipse Marketplace... 在Search标签或者Po ...
- Codeforces Round #389 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 3) 圣诞之夜!
A. Santa Claus and a Place in a Class 模拟题.(0:12) 题意:n列桌子,每列m张桌子,每张桌子一分为2,具体格式看题面描述.给出n,m及k.求编号为k的桌子在 ...
- 1284-Primitive Roots,学信安的路过
Primitive Roots 此题通过率如此之高,料想不会很难,但是再简单小菜还是不会.. 嗯,下 ...
- POJ3246-Balanced Lineup,好经典的题,做法和HDU-I hate it 一样~~
Balanced Lineup Time Limit: 5000MS Memory Limit: 65536K Case Time Limit: 2000MS Description For ...
- html template & import link bug
html template & import link bug html templates is OK https://caniuse.com/#search=html%20template ...
- 【POJ2774&Ural1517】Long Long Message(后缀数组)
题意:求两个字符串的最长公共子串 n<=1000 思路:这是一道论文题 ..]of longint; n,l1,l2,i,ans,m,l,r:longint; ch:ansistring; pr ...
- django学习之- 信号
- Django内置的信号Model signals pre_init # django的modal执行其构造方法前,自动触发 post_init # django的modal执行其构造方法后,自动触 ...