OS Manuals

/usr/bin/mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting

From mycli 2.30.3-r0 (os), captured 2026-11-05 by running mycli --help (exit 0). permalink

Usage: mycli [OPTIONS] DATABASE

  Rich MySQL terminal client with auto-completion, syntax highlighting, and
  dataframes.

  Examples:
    - mycli my_database
    - mycli --user my_user --host my_host.com my_database
    - mycli mysql://my_user@my_host.com:3306/my_database

Options:
  -h, --host, --hostname TEXT     Host address of the MySQL server.
  -P, --port INTEGER              Port number on the MySQL server.
  -u, --user, --username TEXT     User name to connect to the MySQL server.
  -S, --socket PATH               Socket path to connect to the MySQL server.
  -p, --pass, --password TEXT     Password to connect to the MySQL server..
                                  Use with a value to set the password at the
                                  CLI, or alone in the last position to
                                  request a prompt.
  --password-file PATH            File or FIFO path containing the password to
                                  connect to the server.
  --vault-address TEXT            "vault kv get" integration: value for
                                  $VAULT_ADDR if unset in the environment or
                                  ~/.myclirc.
  --vault-mount TEXT              "vault kv get" integration: value for -mount
                                  if unset in ~/.myclirc.
  --vault-secret TEXT             "vault kv get" integration: secret name.
  --vault-password-field TEXT     "vault kv get" integration: field containing
                                  the password.
  --vault-username-field TEXT     "vault kv get" integration: field containing
                                  the username.
  --ssl-mode [auto|on|off]        Set desired SSL behavior. auto=preferred if
                                  TCP/IP, on=required, off=off.
  --ssl-ca PATH                   CA file in PEM format.
  --ssl-capath DIRECTORY          CA directory.
  --ssl-cert PATH                 X509 certificate in PEM format.
  --ssl-key PATH                  X509 key in PEM format.
  --ssl-cipher TEXT               SSL cipher to use.
  --tls-version [tlsv1|tlsv1.1|tlsv1.2|tlsv1.3]
                                  TLS protocol version for secure connection.
  --ssl-verify-server-cert        Verify server's "Common Name" in its cert
                                  against hostname used when connecting.
  -v, --verbose                   More verbose output and feedback.  Can be
                                  given multiple times.
  -q, --quiet                     Less verbose output and feedback.
  -D, --database TEXT             Database or DSN to use for the connection.
  -d, --dsn TEXT                  DSN alias configured in the ~/.myclirc file,
                                  or a full DSN.
  --list-dsn                      Show list of DSN aliases configured in the
                                  [alias_dsn] section of ~/.myclirc.
  --completions [bash|zsh|fish]   Print a completion script for the selected
                                  shell.
  -R, --prompt TEXT               Prompt format (Default: "\t \u@\h:\d> ").
  --toolbar TEXT                  Toolbar format.
  -l, --logfile PATH              Log every query and its results to a file.
  --checkpoint TEXT               In batch or --execute mode, log successful
                                  queries to a file, and skip them on replay
                                  with --resume.
  --resume                        In batch mode, resume after replaying
                                  statements in the --checkpoint file.
  --myclirc PATH                  Location of the myclirc configuration file.
  --auto-vertical-output          Automatically switch to vertical output mode
                                  if the result is wider than the terminal
                                  width.
  --show-warnings / --no-show-warnings
                                  Whether to show warnings after executing a
                                  SQL statement.
  -t, --table                     Shorthand for --format=table.
  --csv                           Shorthand for --format=csv.
  --warn / --no-warn              Whether to warn before running a destructive
                                  query.
  --warn-batch                    Warn before running a destructive query when
                                  executing a script.
  --local-infile BOOLEAN          Enable/disable LOAD DATA LOCAL INFILE.
  -g, --login-path TEXT           Read this path from the login file.
  -e, --execute TEXT              Execute command and quit.
  --init-command TEXT             Initial SQL statement to execute when
                                  connecting.
  --unbuffered                    Instead of copying every row of data into a
                                  buffer, fetch rows as needed, saving memory.
  --charset, --character-set TEXT
                                  Character set for MySQL session.
  --batch PATH                    SQL script to execute in batch mode.
  --format [default|csv|tsv|table]
                                  Format for batch or --execute output.
  --throttle FLOAT                Pause in seconds between queries in batch
                                  mode.
  --progress                      Show progress on the standard error with
                                  --batch.
  --use-keyring [auto|true|false|reset]
                                  Store and retrieve passwords from the system
                                  keyring. auto means true, unless within an
                                  SSH connection.
  --keepalive-ticks INTEGER       Send regular keepalive pings to the
                                  connection, roughly every <int> seconds.
  --ssh-jump TEXT                 Open an SSH tunnel via [user@]host[:port]
                                  and connect to MySQL through it. Works best
                                  if SSH is configured not to prompt for a
                                  password interactively.
  --ssh-options TEXT              Extra CLI arguments for SSH with --ssh-jump,
                                  placed after options from ~/.myclirc.
  --kubectl-resource RESOURCE     Open a kubectl port-forward tunnel to
                                  RESOURCE and connect through it.
  --kubectl-options TEXT          Extra CLI arguments for kubectl with
                                  --kubectl-resource.
  --boundary-id TARGET_ID         Open a HashiCorp Boundary tunnel to
                                  TARGET_ID and connect through it.
  --checkup                       Run a checkup on your configuration.
  -V, --version                   Output mycli's version.
  --help                          Show this message and exit.
Options (56)
OptionDescriptionSource
-h, --host, --hostname TEXTHost address of the MySQL server.help
-P, --port INTEGERPort number on the MySQL server.help
-u, --user, --username TEXTUser name to connect to the MySQL server.help
-S, --socket PATHSocket path to connect to the MySQL server.help
-p, --pass, --password TEXTPassword to connect to the MySQL server..help
--password-file PATHFile or FIFO path containing the password to connect to the server.help
--vault-address TEXT"vault kv get" integration: value for $VAULT_ADDR if unset in the environment or ~/.myclirc.help
--vault-mount TEXT"vault kv get" integration: value for -mount if unset in ~/.myclirc.help
--vault-secret TEXT"vault kv get" integration: secret name.help
--vault-password-field TEXT"vault kv get" integration: field containing the password.help
--vault-username-field TEXT"vault kv get" integration: field containing the username.help
--ssl-mode auto|on|offSet desired SSL behavior.help
--ssl-ca PATHCA file in PEM format.help
--ssl-capath DIRECTORYCA directory.help
--ssl-cert PATHX509 certificate in PEM format.help
--ssl-key PATHX509 key in PEM format.help
--ssl-cipher TEXTSSL cipher to use.help
--tls-version tlsv1|tlsv1.1|tlsv1.2|tlsv1.3TLS protocol version for secure connection.help
--ssl-verify-server-certVerify server's "Common Name" in its cert against hostname used when connecting.help
-v, --verboseMore verbose output and feedback.help
-q, --quietLess verbose output and feedback.help
-D, --database TEXTDatabase or DSN to use for the connection.help
-d, --dsn TEXTDSN alias configured in the ~/.myclirc file, or a full DSN.help
--list-dsnShow list of DSN aliases configured in the [alias_dsn] section of ~/.myclirc.help
--completions bash|zsh|fishPrint a completion script for the selected shell.help
-R, --prompt TEXTPrompt format (Default: "\t \u@\h:\d> ").help
--toolbar TEXTToolbar format.help
-l, --logfile PATHLog every query and its results to a file.help
--checkpoint TEXTIn batch or --execute mode, log successful queries to a file, and skip them on replay with --resume.help
--resumeIn batch mode, resume after replaying statements in the --checkpoint file.help
--myclirc PATHLocation of the myclirc configuration file.help
--auto-vertical-outputAutomatically switch to vertical output mode if the result is wider than the terminal width.help
-t, --tableShorthand for --format=table.help
--csvShorthand for --format=csv.help
--warn /Whether to warn before running a destructive query.help
--warn-batchWarn before running a destructive query when executing a script.help
--local-infile BOOLEANEnable/disable LOAD DATA LOCAL INFILE.help
-g, --login-path TEXTRead this path from the login file.help
-e, --execute TEXTExecute command and quit.help
--init-command TEXTInitial SQL statement to execute when connecting.help
--unbufferedInstead of copying every row of data into a buffer, fetch rows as needed, saving memory.help
--charset, --character-set TEXTCharacter set for MySQL session.help
--batch PATHSQL script to execute in batch mode.help
--format default|csv|tsv|tableFormat for batch or --execute output.help
--throttle FLOATPause in seconds between queries in batch mode.help
--progressShow progress on the standard error withhelp
--use-keyring auto|true|false|resetStore and retrieve passwords from the system keyring.help
--keepalive-ticks INTEGERSend regular keepalive pings to the connection, roughly every <int> seconds.help
--ssh-jump TEXTOpen an SSH tunnel via [user@]host[:port] and connect to MySQL through it.help
--ssh-options TEXTExtra CLI arguments for SSH with --ssh-jump, placed after options from ~/.myclirc.help
--kubectl-resource RESOURCEOpen a kubectl port-forward tunnel to RESOURCE and connect through it.help
--kubectl-options TEXTExtra CLI arguments for kubectl withhelp
--boundary-id TARGET_IDOpen a HashiCorp Boundary tunnel to TARGET_ID and connect through it.help
--checkupRun a checkup on your configuration.help
-V, --versionOutput mycli's version.help
--helpShow this message and exit.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.