mycli

MyCLI is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.

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的更多相关文章

  1. 用批处理启动MySQL命令行工具

    最近在看MySQL,安装好之后,每次在开始菜单去启动MySQL命令行工具的时候,都是直接用root用户连接我本地的数据库 输入密码开始工作,但是要连接服务器上的MySQL的话,就要去CMD下运行 : ...

  2. [MySQL]命令行工具和基本操作

    [MySQL]命令行工具和基本操作 一 MySQL命令行工具  (查看帮助 ---help,或 -?) 1)MySQL MySQL是一个简单的SQL外壳(有GNU readline功能).它支持交互式 ...

  3. Mysql 命令行工具

    1.Mysql命令行工具分为两类:服务端命令行工具和客户端命令行工具. 2.服务端工具 mysql_install_db:建库工具 mysqld_safe:Mysql服务的启动工具,mysqld_sa ...

  4. MySQL命令行工具各功能说明(转)

    MySQL 服务器端使用工具程序 mysqld - SQL 后台程序(即 MySQL 服务器进程).该程序必须启动运行,才能连接服务器来访问数据库. mysqld_safe - 服务器启动脚本,可以通 ...

  5. MYSQL 命令行工具自动登录的方法

    MYSQL 命令行工具自动登录的方法 1. 需求提出 由于在linux 环境下,经常需要使用mysql(command-line tool) 终端连接到MYSQL DB服务. 其中大致的语法如下: m ...

  6. MySQL命令行导出、导入数据库,备份数据库表

    MySQL导出数据库/数据表 1.首先,将你MySQL安装目录,例如C:\Program Files\MySQL\MySQL Server 5.7\bin添加到你的系统环境变量PATH中: 2.导出数 ...

  7. MySQL命令行登录的例子

    环境:MySQL Sever 5.1 + MySQL命令行工具 问题:MySQL命令行登录 解决: 命令 行登录语法: mysql –u用户名 [–h主机名或者IP地址] –p密码 说明:用户名是你登 ...

  8. mysql命令行导入sql脚本中文变问号问题

    之前一直用工具连接mysql虽然小问题不断也都无伤大雅,最近做金融云项目,只能通过服务器的内网访问数据库,也就是说只能在linux下通过命令行访问,在导入中文的时候发现都变成问号了,经过查询资料解决, ...

  9. mysql 命令行操作入门(详细讲解版)

    之前分享过多次Mysql主题,今天继续分享mysql命令行入门   1. 那么多mysql客户端工具,为何要分享命令行操作? -快捷.简单.方便 -在没有客户端的情况下怎么办 -如果是mysql未开启 ...

随机推荐

  1. 专访Vue作者尤雨溪:Vue CLI 3.0重构的原因

    1.为什么要对 Vue CLI 进行大规模修改? 尤雨溪认为旧版本的 Vue CLI 本质上只是从 GitHub 拉取模版,这种拉模版的方式有几个问题: (1) 在单个模版里面同时支持太多选项会导致模 ...

  2. LeetCode(20)Valid Parentheses

    题目 Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the i ...

  3. 杭电 2647 Reward (拓扑排序反着排)

    Description Dandelion's uncle is a boss of a factory. As the spring festival is coming , he wants to ...

  4. 3.3.2 使用 cut 选定字段

        cut 命令是用来剪下文本文件里的数据,文本文件可以是字段类型或是字符类型.后一种数据类型在遇到需要从文件里剪下特定的列时,特别方便.请注意:一个制表字符在此被视为单个字符.          ...

  5. SVN服务器的部署与安装

    需要下载并安装VisualSVN,TortoiseSVN,VisualSVN-Server三个工具. 其中VisualSVN是SVN针对VisualStudio的插件: TortoiseSVN是客户端 ...

  6. DEV Express中ImageCollection的使用

    1,        ImageCollection作为窗体组件的一种,位于Components分类下,拖进窗体以后,显示在界面的底部. 2,        注意ImageCollection的Imag ...

  7. Java学习之for循环打印菱形练习

    for循环语句是Java程序设计中非常有用的循环语句.一个for循环可以用来重复执行某条语句,直到某个条件得到满足.在Java 5新增的加强的foreach语法,也非常有用. 1. for语句 for ...

  8. @setupmethod -- flask.setupmethod

    源码: def setupmethod(f): """Wraps a method so that it performs a check in debug mode i ...

  9. Flask 架构 --xunfeng实例研究

    文件结构 │ Config.py # 配置文件 │ README.md # 说明文档 │ Run.bat # Windows启动服务 │ Run.py # webserver │ Run.sh # L ...

  10. 【最长上升子序列记录路径(n^2)】HDU 1160 FatMouse's Speed

    https://vjudge.net/contest/68966#problem/J [Accepted] #include<iostream> #include<cstdio> ...