mycli: Awesome MySQL/MariaDB mysql client with auto-completion and syntax highlighting

I already wrote about auto-completion in the MySQL/MaiaDB command-line client using an auto-rehash feature. Recently I found out a new tool called mycli. It is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting.



This tool is written in Python. You need to use pip command to install it on Linux or Unix-like system. This tool support auto-completion table names, database names, aliases, SQL syntax, keeps track of the queries entered, and much more.

ADVERTISEMENTS



Installation

If pip not installed on a Debian/Ubuntu Linux, type the following apt command/apt-get command:

$ sudo apt install python-pip

If you are using RHEL/CentOS, use yum command to install the same:

$ sudo yum install python-pip

Install mycli

Type the following command on Linux or Unix-like system to install mycli:

$ pip install mycli

If you are using macOS Unix, type the following brew command to install mycli:

$ brew update && brew install mycli

Sample outputs:

==> Downloading https://homebrew.bintray.com/bottles/mycli-1.10.0.sierra.bottle.tar.gz ######################################################################## 100.0% ==> Pouring mycli-1.10.0.sierra.bottle.tar.gz ==> Using the sandbox 🍺 /usr/local/Cellar/mycli/1.10.0: 1,293 files, 24.4MB

How do I use mycli command?

The syntax is:

$ mycli -u user -p db_name

$ mycli -u user -h host_name -p db_name

Sample outputs:



See also

Category List of Unix and Linux commands File Management cat Network Utilities dig • host • ip • nmap Package Manager apk • apt Processes Management bg • chroot • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time Searching grep • whereis • which User Information groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w

ADVERTISEMENTS



Let us see mycli auto complete feature. Just start typing sql command such as show dat:Here is a small demo: