---
name: "mycli"
section: "1"
platform: "linux"
package: "mycli"
version: "1.31.2-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mycli"
---

# mycli(1)

CLI for MySQL/MariaDB with auto-completion and syntax highlighting

## NAME

mycli - CLI for MySQL/MariaDB with auto-completion and syntax highlighting

## SYNOPSIS

**mycli** \[*OPTIONS*\] \[*DATABASE*\]

## DESCRIPTION

mycli is a command line interface for MySQL/MariaDB with auto-completion and syntax highlighting. It is also capable of pretty printing tabular data.

## 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\|--pass *TEXT*

  Password to connect to the database.

- \-v\|--version

  Version of mycli.

- \-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 config group with the specified suffix.

- \--defaults-file *PATH*

  Only read default options from the given file.

- \--login-path *TEXT*

  Read this path from the login file.

- \--help

  Shows the help message and exit.

## EXAMPLES

$ mycli my\_database

- $ mycli -u my\_user -h my\_host.com my\_database

  - $ mycli mysql://my\_user@my\_host.com:3306/my\_database

  ## SEE ALSO

litecli(1)

- [pgcli(1)](/pgcli/1.md)

  - iredis(1)

  ## HOMEPAGE

More information about mycli and the DBCLI project can be found on the homepage at https://www.mycli.net and https://www.dbcli.com.

## AUTHORS

mycli was written by Amjith Ramanujam \<amjith.r@gmail.com\>.

- This manual page was written by Lennart Weller \<lhw@ring0.de\>, for the Debian project (but may be used by others).
