Three methods of automatically completing commands in MySQL database

Three methods of automatically completing commands in MySQL database

Note: The third method is only used in XSell and cannot be used in finalsell.

Method 1: Temporarily use the auto-complete function

mysql -u root -p --auto-rehash

Method 2: Use the autocomplete function permanently

vim /etc/my.cnf
[mysql]
auto-rehash

Method 3: Use the mycli software to implement automatic completion

This method requires the use of online sources to install the package

yum -y install epel-release
yum -y install python-pip
yum -y install python-devel
yum clean all
yum -y install gcc libffi-devel openssl-devel && pip install --ignore-installed mycli==1.8.0
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel gcc

wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz

mkdir ~/.pip/

cat > ~/.pip/pip.conf <<EOF
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com
EOF

yum -y install libffi-devel zlib* python-devel openssl-devel
tar -zxf Python-3.9.0.tgz
cd Python-3.9.0/
./configure --prefix=/usr/local/python --with-ssl
make && make install 

ln -s /usr/local/python/bin/python3 /usr/bin/

echo 'export PATH=/usr/local/python/bin:$PATH' >> /etc/profile 
source /etc/profile

pip3 install mycli

mycli

This concludes this article about three methods of automatically completing commands in the MySQL database. For more information about automatically completing commands in MySQL, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Solution to the problem that MySQL commands cannot be entered in Chinese
  • Detailed explanation of encoding issues during MySQL command line operations
  • Introduction to the use of MySQL source command
  • MySQL commonly used SQL and commands from entry to deleting database and running away
  • Implementation of mysql using mysqlbinlog command to restore accidentally deleted data
  • Introduction to query commands for MySQL stored procedures
  • MySQL password contains special characters & operation of logging in from command line
  • Mysql desktop tool SQLyog resources and activation methods say goodbye to the black and white command line
  • MySQL login and exit command format
  • How to use the MySQL authorization command grant
  • Summary of MySQL basic common commands

<<:  Pure CSS3 to achieve pet chicken example code

>>:  JavaScript removes unnecessary properties of an object

Recommend

MySQL 8.0.21.0 Community Edition Installation Tutorial (Detailed Illustrations)

1. Download MySQL Log in to the MySQL official we...

Detailed explanation of Redis master-slave replication practice using Docker

Table of contents 1. Background 2. Operation step...

SQL uses ROW_NUMBER() OVER function to generate sequence number

Syntax: ROW_NUMBER() OVER(PARTITION BY COLUMN ORD...

Introduction and analysis of three Binlog formats in MySQL

one. Mysql Binlog format introduction Mysql binlo...

Several reasons for not compressing HTML

The reason is simple: In HTML documents, multiple ...

Design Theory: Textual Expression and Usability

<br />In text design, we usually focus on th...

How to encapsulate the table component of Vue Element

When encapsulating Vue components, I will still u...

A brief discussion on whether MySQL can have a function similar to Oracle's nvl

Use ifnull instead of isnull isnull is used to de...

MySQL series 15 MySQL common configuration and performance stress test

1. Common MySQL configuration All the following c...

Complete steps to configure a static IP address for a Linux virtual machine

Preface In many cases, we will use virtual machin...

Undo log in MySQL

Concept introduction: We know that the redo log i...

Solution to the problem of insufficient storage resource pool of Docker server

Table of contents 1. Problem Description 2. Probl...

How to hide elements on the Web and their advantages and disadvantages

Example source code: https://codepen.io/shadeed/p...

Solve the problem that ifconfig and addr cannot see the IP address in Linux

1. Install the Linux system on the virtual machin...