方法一
#### 安装相关依赖软件(需要配置yum官方或者阿里源进行安装) ``` 1 yum -y install epel-release 2 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 ``` #### 下载python安装包(自己下载过可以忽略此步骤) ``` 1 wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0.tgz ``` #### 创建目录,并添加配置 ``` 1 mkdir ~/.pip/ 2 3 cat > ~/.pip/pip.conf <<EOF 4 [global] 5 index-url = https://mirrors.aliyun.com/pypi/simple/ 6 7 [install] 8 trusted-host=mirrors.aliyun.com 9 EOF ``` #### 安装相关依赖软件,解压python软件包并进行编译安装 ``` 1 yum -y install libffi-devel zlib* python-devel openssl-devel 2 tar -zxvf Python-3.9.0.tgz 3 cd Python-3.9.0/ 4 ./configure --prefix=/usr/local/python --with-ssl 5 make && make install ``` #### 优化路径,安装pip3 ``` 1 ln -s /usr/local/python/bin/python3 /usr/bin/ 2 3 echo 'export PATH=/usr/local/python/bin:$PATH' >> /etc/profile 4 source /etc/profile 5 6 pip3 install mycli ``` #### 登录测试 ``` 1 mycli -u root -p <密码> ```
方式二:临时使用自动补全功能
mysql -u root -p --auto-rehash
方式三:永久使用自动补全功能
vim /etc/my.cnf [mysql] auto-rehash
标签:补全,python,devel,####,etc,tab,MySQL,pip From: https://www.cnblogs.com/linuxmysql/p/16705893.html