报错内容
redis-cli 登录使用命令加上了密码,结果提示如下报错。
$ /usr/local/redis/bin/redis-cli -h 10.10.0.2 -a ypp304a
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
正确的解决办法
$ /usr/local/redis/bin/redis-cli -h 10.10.0.2
10.10.0.2> auth ypp304a
使用 auth 命令输入密码,而不是直接终端命令行中携带密码。
在使用redis-cli登录Redis服务器时,收到警告提示使用密码可能不安全。正确做法是先连接服务器,然后通过auth命令输入密码。这样可以确保密码不在命令行历史记录中暴露,提高安全性。
1402

被折叠的 条评论
为什么被折叠?



