bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

MySQL5.6配置安全的加密密碼-創新互聯

在s

創新互聯公司堅持“要么做到,要么別承諾”的工作理念,服務領域包括:網站設計制作、網站制作、企業官網、英文網站、手機端網站、網站推廣等服務,滿足客戶于互聯網時代的陵水黎族網站設計、移動媒體設計的需求,幫助企業找到有效的互聯網解決方案。努力成為您成熟可靠的網絡建設合作伙伴!hell腳本中,通常要配置數據庫的明文密碼,這是不安全的。在MySQL 5.6版本以后,可以配置安全的加密密碼文件,之后可以使用加密后的密碼文件連接數據庫,而不需要輸入明文密碼。
為本地root用戶配置安全加密密碼
[root@localhost ~]# mysql_config_editor set --user=root --password
Enter password:
嘗試連接數據庫
[root@localhost ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 179
Server version: 5.6.31-77.0-log Percona Server (GPL), Release 77.0, Revision 5c1061c
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, 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> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)
mysql> exit
Bye
到家目錄,查看加密密碼文件,可以看到里面的亂碼
[root@localhost ~]# cd
[root@localhost ~]# cat .mylogin.cnf
?
?#[root@localhost ~]# p_?EQ!?a\S??T SB??hH?XJ?-&?P?-/?|m5?
配置指定的遠程數據庫連接用戶
[root@localhost ~]# mysql_config_editor set --login-path=remote --host=192.168.56.101 --user=ss7 --password
Enter password:
查看配置過的加密密碼清單
[root@localhost ~]# mysql_config_editor print --all
[client]
user = root
password = *****
[remote]
user = ss7
password = *****
host = 192.168.56.101
嘗試連接數據庫
[root@localhost ~]# mysql --login-path=remote
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 181
Server version: 5.6.31-77.0-log Percona Server (GPL), Release 77.0, Revision 5c1061c
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, 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> select user();
+--------------------+
| user()             |
+--------------------+
| ss7@192.168.56.101 |
+--------------------+
1 row in set (0.00 sec)
mysql> exit
Bye
通過--login-path選項連接root本地用戶
[root@localhost ~]# mysql --login-path=client
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 182
Server version: 5.6.31-77.0-log Percona Server (GPL), Release 77.0, Revision 5c1061c
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, 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> select user();
+----------------+
| user()         |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

網站欄目:MySQL5.6配置安全的加密密碼-創新互聯
轉載來于:http://vcdvsql.cn/article46/ddhihg.html

成都網站建設公司_創新互聯,為您提供ChatGPT定制開發網站設計公司網站排名網站營銷手機網站建設

廣告

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

搜索引擎優化