千家信息网

mysql命令行自动补全——mycli安装

发表于:2025-02-23 作者:千家信息网编辑
千家信息网最后更新 2025年02月23日,1、基于python安装pip[root@mysql ~]# yum -y install python-pip python-devel[root@mysql ~]# curl https://bo
千家信息网最后更新 2025年02月23日mysql命令行自动补全——mycli安装

1、基于python安装pip

[root@mysql ~]# yum -y install python-pip python-devel[root@mysql ~]# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py[root@mysql ~]# python get-pip.py 

2、发现报错如下:

  Found existing installation: configobj 4.7.2ERROR: 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.

3、解决错误:

[root@mysql ~]# pip install --ignore-installed mycli

4、测试使用效果:

[root@mysql ~]# mycli -uroot -p123.com      #使用命令mycli登录到数据库#以下是提示信息(2003, "Can't connect to MySQL server on 'localhost' ([Errno 2] No such file or directory)")Failed to connect by socket, retrying over TCP/IPmysql 5.7.24mycli 1.20.1Chat: https://gitter.im/dbcli/mycliMail: https://groups.google.com/forum/#!forum/mycli-usersHome: http://mycli.netThanks to the contributor - Mikhail Borisov

5、写SQL语句测试效果(出现的提示,可以使用上下键来进行选择。):

-------- 本文至此结束,感谢阅读 --------

0