Install MyCLI to improve the SQL typing

Windows Articles

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

How to change the hostname on Ubuntu?

This simple tutorial will teach you how to change the hostname on Ubuntu. The steps we will tell you here will work...

How to install Screaming Frog SEO Spider on Ubuntu 20.04 / 18.04?

If you are working with blogs and content creation then you should know about SEO. Or in the best case, you have...

How to Configure a Firewall in Ubuntu 20.04 / Debian 10?

There is nothing safe from hackers on the Internet, however, we can implement security measures to be more protected against an attack. With this...

Gnome 3.38 available

Gnome OS is a Linux-based operating system, which has a huge domain in the Linux forums. On September 16, 2020, developers announced...
angeloma
angeloma
Senior Writer and partner

If we are using MySQL or MariaDB it is because we know the commands and the sentences. However, many times, despite knowing them, we can make a mistake. And a mistake could result in a loss of time or great damage to our database. For this and other reasons is that usually, on the client side we use applications to help us with the task. And on the server side? Fortunately, on the server side, we have available a tool that will help us interact with MySQL or MariaDB. So today I will teach you how to install MyCLI to improve the SQL typing.

MyCLI is a tool made in Python with a BSD license that will help us to interact with the SQL language. It supports syntax highlighting and autocompletion. Currently, it only supports MySQL and MariaDB, more than enough for daily work. It has versions for Linux, Windows, and MacOS but it is in Linux where it is more focused.

So, let us install it.

Install MyCLI on Linux

MyCLI is easy to install on our Linux distribution because it is available through PIP. However, for some systems, it is found in the official repositories making installation even easier. So let us go for it.

If you are using Debian, Ubuntu, Linux Mint or ElementaryOS, open a terminal and run:

:~$ sudo apt install mycli

1 Install MyCLI
1 Install MyCLI

On the other hand, if you are using Fedora:

:~$ sudo dnf install mycli

However for others Linux distribution, you have to install python PIP and then,

:~$ pip install mycli

As you can see the installation is simple.

Basic use of MyCLI

Once we have it installed in our system, it only remains to start using it.

To use it, it is necessary to follow this syntax:

:~$ mycli -u [user] -p [database]

Then, you will have to type the root password to enter. It is also possible to do this by specifying a user and a host, for example:

:~$ mycli -u [user] -h [host] -p [database]

Once you have entered your password, you will see that you can start working. Its main feature is the autocompletion of the syntax.

2.- Using MyCLI
2.- Using MyCLI

Finally, MyCLI has the help that you can take full advantage of.

:~$ mycli --help

3.- MyCLI version
3.- MyCLI version

This way you will be able to use MyCLI better.

Conclusion

MyCLI is a very simple tool but it will help a lot in SQL management. Although it is limited to MySQL and MariaDB it is enough for our daily work or educational project. This greatly improves workflow and agility in SQL.

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

How to change the hostname on Ubuntu?

This simple tutorial will teach you how to change the hostname on Ubuntu. The steps we will tell you here will work...

How to install Screaming Frog SEO Spider on Ubuntu 20.04 / 18.04?

If you are working with blogs and content creation then you should know about SEO. Or in the best case, you have...

How to Configure a Firewall in Ubuntu 20.04 / Debian 10?

There is nothing safe from hackers on the Internet, however, we can implement security measures to be more protected against an attack. With this...

Gnome 3.38 available

Gnome OS is a Linux-based operating system, which has a huge domain in the Linux forums. On September 16, 2020, developers announced...
x