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.2
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.

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/IP
mysql 5.7.24
mycli 1.20.1
Chat: https://gitter.im/dbcli/mycli
Mail: https://groups.google.com/forum/#!forum/mycli-users
Home: http://mycli.net
Thanks to the contributor - Mikhail Borisov

5、寫SQL語句測試效果(出現的提示,可以使用上下鍵來進行選擇。):

mysql命令行自動補全——mycli安裝

———————— 本文至此結束,感謝閱讀 ————————

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章