亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

mysql_config_editor用法舉例

發布時間:2020-08-09 07:51:02 來源:ITPUB博客 閱讀:205 作者:chenfeng 欄目:MySQL數據庫

mysql_config_editor是一種存儲mysql登錄信息的工具。

通過mysql_config_editor設置了登錄信息后,在用mysql命令登錄數據庫時就可以只用加一個--login-path=name的參數,

而不用再輸入host,user,password等信息登陸。


舉例如下:

正常登陸為:

# mysql -uroot -p'123456' --socket=/tmp/mysql.sock


配置config_editor:

#mysql_config_editor set --login-path=9527 --socket=/tmp/mysql.sock --user=root --password

Enter password:      --此時輸入123456

 

打印config_editor信息:

#mysql_config_editor print --all

[9527]

user = root

password = *****

socket = /tmp/mysql.sock



用mysql --login-path登陸:

#mysql --login-path=9527

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 66820

Server version: 8.0.13 MySQL Community Server - GPL


Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql>\s

--------------

mysql  Ver 8.0.13 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)


Connection id:          66820

Current database:

Current user:           root@localhost

SSL:                    Not in use

Current pager:          stdout

Using outfile:          ''

Using delimiter:        ;

Server version:         8.0.13 MySQL Community Server - GPL

Protocol version:       10

Connection:             Localhost via UNIX socket

Server characterset:    utf8mb4

Db     characterset:    utf8mb4

Client characterset:    utf8mb4

Conn.  characterset:    utf8mb4

UNIX socket:            /tmp/mysql.sock

Uptime:                 23 hours 41 min 42 sec


Threads: 2  Questions: 266  Slow queries: 0  Opens: 380  Flush tables: 2  Open tables: 352  Queries per second avg: 0.003

--------------


mysql>quit

Bye


reset 刪除config_editor日志的所有內容

# mysql_config_editor reset


開發shell腳本時不提示密碼方法:

# cd ~

# vim .my.cnf

[client]

user=root

password=123456


直接敲mysql就能登陸,不需要輸入密碼:

# mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 132246

Server version: 8.0.13 MySQL Community Server - GPL


Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.


Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


mysql >quit

Bye







向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

边坝县| 杨浦区| 息烽县| 博爱县| 耿马| 汶川县| 米林县| 凌海市| 堆龙德庆县| 望城县| 金门县| 永春县| 明星| 安岳县| 乐亭县| 翁牛特旗| 奎屯市| 衡南县| 麻栗坡县| 平度市| 富民县| 壶关县| 桐庐县| 游戏| 棋牌| 鄂尔多斯市| 贺州市| 吴旗县| 麻阳| 贵德县| 康定县| 天峨县| 化州市| 浠水县| 朝阳县| 平遥县| 青龙| 沁阳市| 时尚| 长乐市| 韩城市|