Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql command auto-completion-the most complete in the network-support syntax highlighting

Shulou Source: shulou.com Published: 2022-06-01 04:08:48 09月30日 Update

Method one

Today, we recommend another command line artifact-Mycli.Mycli.

Is a MySQL command line client tool with automatic completion and syntax highlighting.

It is a tool developed by Indians based on python, suitable for beginners or people who are familiar with the database but can not remember commands, and can well overcome the difficulty of not remembering commands.

Official website: http://mycli.net/

Open source address: https://github.com/dbcli/mycli

Installation

It is recommended that you install dependencies first

$yum install python-pip python-devel

$pip install mycli

The official installation is to install the python's two plug-ins first, then use the python plug-in PIP to download and install the mycli tool, but many times the installation will report an error. First of all, some domestic shadow sources of ​​ may not support installing python-PIP tools.

After installing python, you think you can install mycli by running pip install mycli directly.

If you encounter the following error

Cannot uninstall 'configobj'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Perform the installation

$pip install-ignore-installed mycli

Generally, you already know how to install Python's package, so you can simply execute:

$pip install mycli

If you are on a Mac system, you can install it by yourself.

$brew update & & brew install mycli

If you encounter problems during installation, please check the official website for detailed e-magazine instructions.

Use

You are the only one who needs a command to start mycli.

For more information, please see:

Mycli-help

Method two

The first step is performed under mysql: rehash

The second step is use in a library: use mysql; and then you can use it happily.

For example:

MariaDB [(none)] > rehashMariaDB [(none)] > use mysql

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with-A

Database changed

MariaDB [mysql] > commcommand_type comment

MariaDB [mysql] > comm

Note that some commands can only be completed in uppercase, such as SELECT, SET, etc.

Tags: Commands tools plug-ins methods syntax support pleasure difficulty two crowd beginner function Indian parameter can pass address uppercase official client client Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Linux Shulou Information Xiaomi vpn