mycli: An excellent Terminal for MySQL with AutoComplete and syntax highlighting

MySQL, MariaDB y percona they are three databases widely used today, the first two are embedded in a large percentage of open source applications that exist today. This is why it is important to have a terminal for MySQL, MariaDB and Percona that allows us to efficiently manage these databases, from the comfort and convenience that the console offers us.

This time we are going to get to know mycli, a database terminal that has the necessary characteristics to efficiently manage our databases, without consuming excessive resources and with extensive documentation at our disposal.

What is mycli?

mycli is an open source tool, developed in Python, which allows us to manage and execute MySQL, MariaDB, and Percona commands in a fast, automated and efficient way. The tool has an advanced autocompletion system for the aforementioned database languages, in the same way, it highlights the syntax in a standard way, which helps us to manage our databases in a comfortable way from the terminal.

It has a fairly short installation and learning line, which added to its excellent characteristics make it a very interesting alternative to tools dedicated to database management, especially due to its low consumption of resources and its accelerated response time. .

A detailed use of the tool can be seen in the following gif released by the tool's developers:

terminal for mysql

Mycli features

  • Completely open source, developed in python and with excellent documentation.
  • Auto-complete as SQL keywords are typed, as well as database tables, views, and columns.
  • Excellent syntax highlighting thanks to Pygments.
  • Smart auto-completion (which is enabled by default), which will only offer context-related hints.
    • SELECT * FROM <tab> it will only show the names of the tables.
    • SELECT * FROM users WHERE <tab> it will only show the column names.
  • Support for queries that include more than one line.
  • It allows to store the most used queries, for this it is enough to save a query using  \fs alias query and use the following command \f alias when you want to run it again.
  • Powerful and simple configuration file, which is automatically generated in the directory ~/.myclirc
  • It has an extensive log system, in case we want to save the history of the executed commands.
  • Lets make use of a nice indentation.
  • The data output is organized and pleasant, it is shown in columns with tabular separations.
  • It has support for SSL connections.
  • Detailed documentation when running the help of the tool $ mycli --help
  • Many others more.

How to install mycli

We can install mycli on any Linux distro thanks to python, for this we simply have to have pip installed and execute the following command:

$ sudo pip install -U mycli

Debian and ubuntu users can install the tool directly from the official repositories by running

$ sudo apt-get install mycli

Likewise, Arch Linux and derivative users can enjoy this tool thanks to the AUR repositories, to do this, execute the following command:

$ yaourt -S mycli

To conclude, I want to emphasize that in the tests carried out, the tool behaved extremely fast and its suggestion when it comes to autocomplete is simply excellent. I even think that this tool is just as useful MySQL Navigator with the advantage that it consumes much less resources, if you are a console lover and also use some of the three databases with which it is compatible, do not hesitate to try this great tool and tell us your impressions about.


4 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Bill said

    Great tool, thank you very much for your articles.

  2.   jvk85321 said

    Do you know what is the typeface of the terminal ????

    1.    Gustavo Martin Corujo said

      Monaco. It is the source! I leave you an option to download for Linux. because the source is from MAC

      https://gist.github.com/rogerleite/99819

      Greetings.

  3.   Gustavo Martin Corujo said

    Very good contribution !! Spectacular tool !!