實用工具mycli:MySQL、MariaDB和Percona的命令行界面

mycli 是默認(rèn)的 MySQL 客戶端的現(xiàn)代替代品,mycli 將在你輸入時自動補全關(guān)鍵字、表名、列和函數(shù)。

創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價比祿勸網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式祿勸網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋祿勸地區(qū)。費用合理售后完善,10年實體公司更值得信賴。

HomePage: http://mycli.net

使用效果如下:

實用工具mycli:MySQL、MariaDB 和 Percona 的命令行界面

RHEL, Centos安裝方式:

        目前作者沒有針對RHEL, Centos提供RPM包,暫時可用pip方式安裝:

        $ sudo yum install python-pip

        $ sudo git clone https://github.com/dbcli/mycli

        $ sudo pip install mycli

命令使用幫助:

    $ mycli --help

    Usage: mycli [OPTIONS] [DATABASE]

    

    Options:

      -h, --host TEXT               Host address of the database.

      -P, --port INTEGER            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 TEXT           Password to connect to the database

      --pass TEXT                   Password to connect to the database

      --ssl-ca PATH                 CA file in PEM format

      --ssl-capath TEXT             CA directory

      --ssl-cert PATH               X509 cert in PEM format

      --ssl-key PATH                X509 key in PEM format

      --ssl-cipher TEXT             SSL cipher to use

      --ssl-verify-server-cert      Verify server's "Common Name" in its cert

                                    against hostname used when connecting. This

                                    option is disabled by default

      -v, --version                 Version of mycli.

      -D, --database TEXT           Database to use.

      -R, --prompt TEXT             Prompt format (Default: "\t \u@\h:\d> ")

      -l, --logfile FILENAME        Log every query and its results to a file.

      --defaults-group-suffix TEXT  Read config group with the specified suffix.

      --defaults-file PATH          Only read default options from the given file

      --myclirc PATH                Location of myclirc file.

      --auto-vertical-output        Automatically switch to vertical output mode

                                    if the result is wider than the terminal

                                    width.

      -t, --table                   Display batch output in table format.

      --csv                         Display batch output in CSV format.

      --warn / --no-warn            Warn before running a destructive query.

      --local-infile BOOLEAN        Enable/disable LOAD DATA LOCAL INFILE.

      --login-path TEXT             Read this path from the login file.

      -e, --execute TEXT            Execute query to the database.

      --help                        Show this message and exit.

使用示例:

        

    $ mycli local_database

    $ mycli -h localhost -u root app_db

    $ mycli mysql://amjith@localhost:3306/django_poll

    

報錯解決:

        出現(xiàn)下如下錯誤:

        error: command 'gcc' failed with exit status 1  

        表示有依賴包未裝全,解決辦法:

        $ sudo yum install python-devel mysql-devel zlib-devel openssl-devel

當(dāng)前名稱:實用工具mycli:MySQL、MariaDB和Percona的命令行界面
新聞來源:http://bm7419.com/article42/goephc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站動態(tài)網(wǎng)站、面包屑導(dǎo)航、全網(wǎng)營銷推廣、關(guān)鍵詞優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

綿陽服務(wù)器托管