#安装pip: #CentOS/RHEL yum install python-pip pip install --upgrade pip #Ubuntu: sudo apt-get install python-pip python-dev build-essential pip install --upgrade pip sudo pip install --upgrade virtualenv #pip或者easy_install时遇到的问题根据命令执行结果进行处理,我这里遇到的主要是相关以来的版本问题 #安装mycli #Linux: pip install mycli #OS X brew install mycli #使用: mycli --help Usage: mycli [OPTIONS] [DATABASE] Options: -h, --host TEXT Host address of the database. -P, --port TEXT Port number to use for connection. Honors $MYSQL_TCP_PORT -u, --user TEXT User name to connect to the database. -S, --socket TEXT The socket file to use for connection. -p, --password Force password prompt. --pass TEXT Password to connect to the database -v, --version Version of mycli. -D, --database TEXT Database to use. -R, --prompt TEXT Prompt format (Default: "\t \[email protected]\h:\d> ") -l, --logfile FILENAME Log every query and its results to a file. --help Show this message and exit. #示例: mycli local_database mycli -h localhost -u root app_db mycli mysql://[email protected]:3306/django_poll #Github: Mycli: https://github.com/dbcli/mycli Pgcli: https://github.com/dbcli/pgcli
时间: 2024-10-25 05:28:46