当前位置: 移动技术网 > IT编程>数据库>Mysql > mysql命令行爱好者必备工具mycli

mysql命令行爱好者必备工具mycli

2019年05月09日  | 移动技术网IT编程  | 我要评论

mycli

mycli is a command line interface for mysql, mariadb, and percona with auto-completion and syntax highlighting.

  • source:
  • chat: gitter
  • mailing list:

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 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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网