一、基于python安装pip

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

二、安装mycli命令行工具

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

三、测试使用效果

[root@db01 ~]# 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.28
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 - Zhongyang Guan
mysql root@localhost:(none)>
#出现该命令提示符表示登录成功

四、编写SQL语句测试

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

相关文章:

  • 2021-08-11
  • 2021-10-05
  • 2021-11-28
  • 2021-11-17
  • 2021-06-12
  • 2021-11-17
  • 2021-11-17
  • 2021-11-17
猜你喜欢
  • 2021-05-05
  • 2022-12-23
  • 2021-08-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-15
相关资源
相似解决方案