Use a Command for MySQL with Autocomplete

Practical and with syntax highlighting!


Use a Command for MySQL with Autocomplete


Who never forgot reserved names from MySQL/MariaDB or typed them incorrectly? To significantly lessen these problems, there is the mycli command.

mycli is a terminal client for MySQL with autocomplete and syntax highlighting.


Installation

The fastest and most practical way to install MyCLI is using pip, remember to have it installed on your system first. To do this, just install it as follows:

pip3 install --user mycli

This will install only for your user, and you will need to have the path ${HOME}/.local/bin in your ${PATH} .

Other ways and for other operating systems it would be:

brew update && brew install mycli # macOS
sudo apt install mycli # Debian, Ubuntu, Mint and derivatives

Usage

After properly installed, you can now log into your MySQL server, with the following command similar to mysql:

mycli -u YOUR_USER -p "YOUR_PASSWORD"

If you type the SQL commands in uppercase or lowercase it will autocomplete anyway. It also doesn’t need a semicolon (;) to end commands

MyCLI

For more information use the --help argument/parameter and refer to the GitHub repository .


mysql mariadb commands


Share


YouTube channel

Subscribe


Marcos Oliveira

Marcos Oliveira

Software developer
https://github.com/terroo

Related articles