MySQL的密码安全警告
登入MySQL的时候,你是可以选择交互式或者将密码指定出来从而直接登录两种方式的:
1.交互式:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
[root@rhel71 ~]# mysql -uroot -p Enter password: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) [root@rhel71 ~]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 17 Server version: 5.7.7-rc-log Source distribution Copyright (c) 2000, 2015, 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> |
2.非交互:
非交互的方式下,密码会明文的显示在终端上。
这样子带来的安全隐患是显而易见的。
但是为了防止用户忽视,MySQL依旧还是指出来了:
mysql: [Warning] Using a password on the command line interface can be insecure.
——————————————————
Done。