protocol error, got 'n' as reply type byte

其它机子的PHP访问redis爆“protocol error, got 'n' as reply type byte ”错误


解决办法:

在redis配置文件redis.conf中注释掉bind配置项的同时把redis3.2新增的配置项

protected-mode由yes改为no,改完后重启redis服务,其它机子就可访问redis服务

注意如果使用src/redis-server 这个指令重启服务器,那问题还是依旧存在,解决方式是使 ./redis-server redis.conf

redis.conf是一个默认的配置文件。刚才我们已经修改里面的配置。 这样其他服务器访问就不会在报错了!

你可能感兴趣的:(Redis,Redis)