LinuxCommandLibrary

mycli

mySQL client with autocompletion

TLDR

Connect to database

$ mycli -u [username] -p [database]
copy
Connect to remote host
$ mycli -h [hostname] -u [username] [database]
copy
Connect with password prompt
$ mycli -u [username] -p
copy
Execute SQL file
$ mycli -u [user] [database] < [script.sql]
copy
Connect via socket
$ mycli -S [/var/run/mysqld/mysqld.sock] -u [user]
copy
Use specific port
$ mycli -h [host] -P [3306] -u [user] [database]
copy

SYNOPSIS

mycli [options] [database]

DESCRIPTION

mycli is a MySQL client with autocompletion. It provides syntax highlighting and smart completion.
The tool enhances MySQL CLI experience. Shows completion suggestions as you type.

PARAMETERS

DATABASE

Database name to connect.
-h HOST
MySQL server hostname.
-u USER
Username.
-p [PASSWORD]
Password (prompt if no value).
-P PORT
Port number.
-S SOCKET
Unix socket path.
--help
Display help information.

CAVEATS

Python-based. Requires MySQL connection. Tab completion for tables/columns.

HISTORY

mycli was created as a user-friendly MySQL CLI with autocompletion, inspired by pgcli.

SEE ALSO

mysql(1), pgcli(1), litecli(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community