原因
1.通过命令设置密码,这种设置方式是临时的,当服务器重启后,密码会失效。
问题如图:
解决方法:
用客户端登录
A.查看密码 config get requirepass
B.设置密码 config set requirepass password
C.设置密码后,客户端连接 redis 服务就需要密码验证,否则无法执行命令:输入 AUTH password
问题解决:
https://blog.csdn.net/baidu_39212797/article/details/111150721?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163626147816780271519175%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fall.%2522%257D&request_id=163626147816780271519175&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allfirst_rank_ecpm_v1~rank_v31_ecpm-2-111150721.first_rank_v2_pc_rank_v29&utm_term=linux%E7%B3%BB%E7%BB%9F%E4%B8%AD%E5%AE%89%E8%A3%85redus%E8%B4%B5%E9%98%B3%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%E5%AF%86%E7%A0%81%E4%B8%94%E5%9C%A8%E6%9C%8D%E5%8A%A1%E5%99%A8%E5%85%B3%E9%97%AD%E5%90%8E%E4%B8%8D%E4%B8%A2%E5%A4%B1&spm=1018.2226.3001.4187
永久解决问题
https://blog.51cto.com/simplelife/1740137
https://zhuanlan.zhihu.com/p/411301533
https://blog.csdn.net/kevin860/article/details/99687946?ops_request_misc=&request_id=&biz_id=102&utm_term=%E8%AE%BE%E7%BD%AE%E4%BA%86%E5%AF%86%E7%A0%81redis%E6%97%A0%E6%B3%95%E8%BF%9C%E7%A8%8B%E8%BF%9E%E6%8E%A5&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-0-99687946.first_rank_v2_pc_rank_v29&spm=1018.2226.3001.4187
关掉服务后在重启配置文件才能生效
用普通用户还没权限修改 需要用管理员权限
redis-server.exe & redis.windows.conf
netstat -ano | findstr 6379
taskkill -pid ---- -f
windows系统中
redis后台运行可用可用可用
https://www.cnblogs.com/zt007/p/15089695.html
[mysqld]
bind-address=0.0.0.0
port=3306
user=root
basedir=/usr/local/mysql
datadir=/data/mysql
socket=/tmp/mysql.sock
log-error=/data/mysql/mysql.err
pid-file=/data/mysql/mysql.pid
skip-grant-tables
character config
character_set_server=utf8mb4
symbolic-links=0
explicit_defaults_for_timestamp=true
daemonize改为yes,不然我每次启动都得在redis-server命令后面加符号&