原文:Redis报错 : (error) NOAUTH Authentication required.

这个错误是因为没有用密码登陆认证 , 先输入密码试试 .

127.0.0.1:6379> auth "yourpassword"

例如密码是‘root’,当出现认证问题时候,输入“auth ‘root’”就可以了.

127.0.0.1:6379> set name "hello"
(error) NOAUTH Authentication required.
127.0.0.1:6379> (error) NOAUTH Authentication required.
(error) ERR unknown command '(error)'
127.0.0.1:6379> auth "root"

如果输入密码后出现以下提示:

(error) ERR invalid password

那么就是你的密码输入错误 , 如果你忘记密码了, 那么这样做来查看自己的密码 :

  1. 进入redis的安装目录(是安装目录的),查看redis.config文件

  2. 用记事本打开,找到 “requirepass foobared”,就能找到你的密码了.

    比如我的密码是这样的: requirepass 123456 也就是123456

  3. 接着cmd 重新进入redis的安装目录 :

    (1) redis-server.exe redis.windows.conf 打开服务器

    (2) 在另一个窗口重新进入该目录, 输入 redis-cli.exe 打开客户端.

    (3) 在客户端 中 输入 auth “123456” 就可以进去了(你输入的是你查到的密码) .

    比如(3), 我的是这样的:

C:\Program Files\redis64-2.8.2101>redis-cli.exe
127.0.0.1:6379> auth "123456"
OK


补充:报错

MISCONF Redis is configured to save RDB snapshots

具体如下:

(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
127.0.0.1:6379> config set stop-writes-on-bgsave-error no

翻译:(错误)misconf redis被配置以保存数据库快照,但misconf redis目前不能在硬盘上持久化。用来修改数据集合的命令不能用,请使用日志的错误详细信息。

解决办法:

运行 config set stop-writes-on-bgsave-error no命令关闭配置项stop-writes-on-bgsave-error解决该问题。

如下:

127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK
127.0.0.1:6379> set a 110
OK
127.0.0.1:6379> get a
"110"

Redis报错 : (error) NOAUTH Authentication required.的更多相关文章

  1. Redis服务停止报错解决方案[NOAUTH Authentication required]

    Redis服务器设置密码后,使用service redis stop 会出现以下信息: service redis stop Stopping ... OK (error) NOAUTH Authen ...

  2. Redis (error) NOAUTH Authentication required.

    首先查看redis设置密码没 127.0.0.1:6379> config get requirepass 1) "requirepass" 2) "" ...

  3. redis安全 (error) NOAUTH Authentication required

    Redis 安全 我们可以通过 redis 的配置文件设置密码参数,这样客户端连接到 redis 服务就需要密码验证,这样可以让你的 redis 服务更安全. 实例 我们可以通过以下命令查看是否设置了 ...

  4. redis 执行操作时提示(error) NOAUTH Authentication required.

    (error) NOAUTH Authentication required. 出现认证问题,设置了认证密码,输入密码即可 127.0.0.1:6379> auth 123456

  5. REdis MASTER aborted replication NOAUTH Authentication required

    对于REdis集群,如果设置了requirepass,则一定要设置masterauth,否则从节点无法正常工作,查看从节点日志可以看到哪下内容:19213:S 22 Apr 2019 10:52:17 ...

  6. redis出现错误:NOAUTH Authentication required.

    出现认证问题,应该是设置了认证密码,输入密码既可以啦 注意密码是字符串形式! 127.0.0.1:6379> auth "yourpassword" 127.0.0.1:63 ...

  7. 编译 redis 报错 error: jemalloc/jemalloc.h: No such file or directory

    gcc编译redis时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2 ...

  8. Redis报(error) NOAUTH Authentication required.问题解决

    启动后 输入auth+空格+密码 ok

  9. Redis (error) NOAUTH Authentication required.解决方法

    当设置redis密码后,打开客户端,需要使用密码验证 auth 123456 就是设置的密码

随机推荐

  1. 51nod-1503 猪和回文 - 二维矩阵上的dp

    题目链接 一只猪走进了一个森林.很凑巧的是,这个森林的形状是长方形的,有n行,m列组成.我们把这个长方形的行从上到下标记为1到n,列从左到右标记为1到m.处于第r行第c列的格子用(r,c)表示. 刚开 ...

  2. K8s初探

    1. K8s概述 2. K8s的工作原理 什么是K8s 用法: 核心概念             集群 Kubernetes Master Node Pod Lable Replication Con ...

  3. var和let的区别

    //var 和let的区别 通过var定义的变量,作用域是整个封闭的函数,是全域的, 通过let定义的变量,作用域是在块级或者是子块中 for (let i = 0; i < 10; i++) ...

  4. 移动端的vue项目,启动错误:Module build failed: Error: No PostCSS Config found in:

    新建一个postcss.config.js 写上下面代码 `module.exports = { plugins: { 'autoprefixer': {browsers: 'last 5 versi ...

  5. js得到区域长宽

    网页可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offset ...

  6. NodeJS学习笔记 (5)网络服务-http-req(ok)

    原文:https://github.com/chyingp/nodejs-learning-guide 自己敲代码: 概览 本文的重点会放在req这个对象上.前面已经提到,它其实是http.Incom ...

  7. 垃圾回收器(GC)

    值类型占用的空间在方法执行结束后会被马上释放, 引用类型占用的空间在方法结束后不会被马上释放,具体什么时间释放由垃圾回收器(GC)来决定. GC(Garbage Collection):JAVA/.N ...

  8. malloc 和free例程

    #include <stdio.h>#include <stdlib.h>int main(){int a;scanf("%d",&a);int * ...

  9. 紫书 习题 8-23 UVa 1623 (set妙用 + 贪心)

    这道题我是从样例中看出思路了 2 4 0 0 1 1 看这组数据, 输出的是No, 为什么呢?因为两个1之间没有神龙喝水, 所以一定会有水灾. 然后就启发了我,两次同一个湖的降水之间必须至少有一次神龙 ...

  10. ZOJ 2601 Warehouse Keeper

    Warehouse Keeper Time Limit: 2000ms Memory Limit: 65536KB This problem will be judged on ZJU. Origin ...