日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 运维知识 > 数据库 >内容正文

数据库

mysql初体验学习笔记_【MySQL】mycli初体验

發(fā)布時(shí)間:2025/3/12 数据库 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mysql初体验学习笔记_【MySQL】mycli初体验 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

早就聽說mycli很好用,今天打算在本地測(cè)試機(jī)上裝一下體驗(yàn)一把。

安裝方法很是簡(jiǎn)單:

一、安裝依賴:

yum install python-pip python-devel

二、安裝mycli

pip install mycli

這樣就安裝完了。

三、使用方法

[root@localhost .pip]# mycli --help

Usage: mycli [OPTIONS] [DATABASE]

A MySQL terminal client with auto-completion and syntax highlighting.

Examples:

- mycli my_database

- mycli -u my_user -h my_host.com my_database

- mycli mysql://my_user@my_host.com:3306/my_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 Output mycli's version.

-D, --database TEXT Database to use.

-d, --dsn TEXT Use DSN configured into the [alias_dsn]

section of myclirc file.

-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 MySQL config groups with the specified

suffix.

--defaults-file PATH Only read MySQL 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 command and quit.

--help Show this message and exit.

參數(shù)選項(xiàng)不多,直接當(dāng)成mysql客戶端來使用即可。

四、體驗(yàn)

mycli

體驗(yàn)了一下,還是挺不錯(cuò)的,語(yǔ)法高亮,還能自動(dòng)補(bǔ)全。

總結(jié)

以上是生活随笔為你收集整理的mysql初体验学习笔记_【MySQL】mycli初体验的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。