Table of Contents
Was this article helpful?
Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles.

How to Install MyCLI on Linux (CentOS, Debian, Fedora, and Ubuntu)

Last Updated: Fri, Aug 17, 2018
CentOS Databases Debian Fedora Linux Guides MySQL and MariaDB
Archived content

This article is outdated and may not work correctly for current operating systems or software.


MyCLI is a command line client for MySQL and MariaDB that allows you to auto-complete and helps with the syntax of your SQL commands.

MyCLI Features

  • Auto-completion as you type for SQL keywords as well as tables, views, and columns in the database.

  • Syntax highlighting of input while typing.

  • Support for multiline queries.

  • Allows you to save your favorite queries.

  • Prints tabular data in an appealing way.

  • Support for SSL connections.

  • Smart-completion (enabled by default) will suggest context-sensitive completion.

  • Log every query and its results to a file.


  • A sudo user.

  • A Vultr Ubuntu/Debian/Fedora/CentOS server instance.

Before installing any packages on the server instance, it is recommended that you update the system. Please review this article about How to Update CentOS 7, Ubuntu 16.04, and Debian 8.



On Debian/Ubuntu distributions, you can easily install the MyCLI package using the apt command.

sudo apt-get install mycli


Fedora has a package available for MyCLI. Install it using dnf command as shown below.

sudo dnf install mycli


For other Linux distributions such as RHEL/CentOS, you’ll need the Python Pip tool to install MyCLI.

Install Pip on your system.

sudo yum install python-pip

Once Pip has been installed, you can install MyCLI as follows.

sudo pip install mycli

Find your version of MyCLI and its usage using following two commands.

# mycli --version 

Version: 1.10.0

# mycli --help

Usage: mycli [OPTIONS] [DATABASE]

A MySQL terminal client with auto-completion and syntax highlighting.


- mycli my_database

- mycli -u my_user -h my_database

- mycli mysql://


Want to contribute?

You could earn up to $600 by adding new articles.