mysql - mysqladmin:警告在命令行界面上使用密码可能不安全
问题描述
当我通过 SSH 连接到我的服务器时,我可以在不使用密码的情况下访问 MySQL 内容。所以当我打字的时候。
mysql -u root -p
它会提示我输入密码,但我可以输入任何内容并访问 MySQL 环境。
所以我尝试使用它来更改root密码,但它不起作用。
mysqladmin -u root password NEW_PASSWORD
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
Warning: Since password will be sent to server in plain text, use ssl connection to ensure password safety.
这个我也试过...
use mysql;
update user set authentication_string=password('NEW_PASSWORD') where user='root';
flush privileges;
quit
那没有用。
和这个...
use mysql;
UPDATE mysql.user SET authentication_string = PASSWORD('NEW_PASSWORD') WHERE User = 'root' AND Host = 'localhost';
flush privileges;
quit
这也没有奏效。
我看过这个教程https://www.techrepublic.com/article/how-to-set-change-and-recover-a-mysql-root-password/但我不明白为什么我应该硬编码我的根文本文件中的密码调用 ~/mysql-pwd 并将其放在我的服务器上。这听起来很疯狂。
(问题 1)将密码输入到服务器上的文本文件中真的安全吗?
我也在使用 winmin 来管理我的服务器,这很奇怪,这可能与我无法设置 root 密码的原因有关。
我的网站上有 SSL 证书,它们可以工作。但是,当我访问端口 10000 上的 webmin 环境时,firefox 无法识别 SSL 证书,我必须在 firefox 中添加一个例外,以便我可以看到我的 webmin 环境。
Firefox 使用 SSL 证书的 phpMyAdmin 没有任何问题。
(问题 2)那么这个 webmin 问题是否意味着我的 SSL 证书设置不正确,这在我 SSH 到服务器时会生效吗?
解决方案
推荐阅读
- angular - 异步函数角度服务
- sql - 比较按另一个值 SQL 分组的两个表中的值
- windows - WinSock2 接受和最慢的客户端一样慢吗?
- ios - 对于低于 iOS 13 的平台,您如何使用 WKWebView 处理 Apple 登录?
- javascript - 尝试使用 expo CLI 发布反应本机应用程序时连接 ECONNREFUSED 127.0.0.1:80
- css - 在 Firefox 中的 HTML 选择中删除焦点选项中的虚线边框/轮廓
- java - 如何打印句子中的回文词?如果我输入“阿罗拉夫人教数学”,它应该打印“阿罗拉夫人”
- typescript - 带有通用参数的打字稿工厂
- c++ - 如何将 HICON 读入 wchar 数组?
- database - 自定义数据未使用 $wpdb 插入数据库