Example of installing mycli mysql client in CENTOS 7

Source: Internet
Author: User
Tags mysql client centos mysql command line

Found a very convenient tool

MyCli
MyCli is a MySQL command line tool that supports automatic completion and syntax highlighting. It can also be used for MariaDB and Percona.

 

Use prompt_toolkit to compile mycli

When you enter SQL keywords, tables and columns in the database, auto-completion is enabled.

Use Pygments to highlight the syntax.

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

SELECT * FROM <tab> only table names are displayed.

SELECT * FROM users WHERE <tab> only displays the column name.

When the configuration file is started for the first time, it is automatically created in ~ /. Myclirc

Beautiful print table data.

My environment is centos7

First install python-pip

This software package cannot be found when python-pip is installed using yum, so we should install the extended source first.

Sudo yum-y install epel-release
Then install python-pip

Sudo yum-y install python-pip
Clear cache

Sudo yum clean all
Now that python-pip is installed, you can install mycli.

Pip install mycli
Some may encounter the following errors during installation.

 

 

This is because the python-devel package is not installed.

Yum install python-devel
Then install MyCli.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.