MySQL database automatic completion command

Note: The third method should be used in XSell, not in finalsell

Method 1: Temporarily use the automatic completion function

mysql -u root -p --auto-rehash

Method 2: Permanently use the automatic completion function

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

Method 3: Use the software mycli to realize the automatic completion function

This method requires the use of online sources for package installation

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

Guess you like

Origin blog.csdn.net/Gengchenchen/article/details/113699959