最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

解決MySQL去除密碼登錄告警的問題

 更新時間:2022年04月20日 10:00:47   作者:忘川的彼岸  
這篇文章主要介紹了MySQL去除密碼登錄告警的問題,解決方法是使用mysql_config_editor,本文通過示例代碼給大家介紹的非常詳細(xì),需要的朋友可以參考下

背景

MySQL在命令行輸入密碼時會提示mysql: [Warning] Using a password on the command line interface can be insecure.,在某些時候會干擾取值。

解決方法:

使用mysql_config_editor可以解決這一問題。
login-path是從MySQL5.6開始支持的特性,借助mysql_config_editor工具可以將登陸MySQL的認(rèn)證信息加密存放在.mylogin.cnf文件。之后,MySQL客戶端可以通過讀取該加密信息進(jìn)行登陸。

示例:

[root@localhost mysql]# mysql_config_editor set --login-path=db_admin --host=192.168.1.6 --user=root --password
Enter password:         # 輸入密碼

參數(shù)

–login-path=name 登陸信息名稱
–host=name 登陸地址
–password 在登陸文件中添加密碼(該密碼會被mysql_config_editor自動加密)
–user 用戶名
–port=name 端口
–socket=name sock文件

查看

# 顯示指定名稱的登陸信息
mysql_config_editor print --login-path=test
# 顯示所有登陸信息
mysql_config_editor print --all

示例:

[root@localhost mysql]# mysql_config_editor print --all
[db_admin]
user = root
password = *****
host = 192.168.1.6
[root@localhost mysql]# mysql_config_editor print --login-path=db_admin
[db_admin]
user = root
password = *****
host = 192.168.1.6

刪除配置

mysql_config_editor remove --login-path=test

登陸

root@localhost mysql]# mysql --login-path=db_admin
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10222
Server version: 5.7.37-log MySQL Community Server (GPL)
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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> 

到此這篇關(guān)于MySQL去除密碼登錄告警的文章就介紹到這了,更多相關(guān)MySQL密碼登錄告警內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論

化隆| 西贡区| 广河县| 波密县| 桐柏县| 杨浦区| 太原市| 东乡族自治县| 南康市| 泰来县| 青神县| 依兰县| 饶河县| 德庆县| 湾仔区| 永吉县| 雷波县| 大洼县| 宣恩县| 宜都市| 策勒县| 绩溪县| 衡东县| 绥宁县| 武鸣县| 孝昌县| 舞钢市| 诸城市| 剑阁县| 威远县| 金溪县| 定远县| 观塘区| 汉源县| 资溪县| 乐东| 田林县| 依安县| 石阡县| 凌海市| 会理县|