Redis ERR 未知命令“FLUSHDB" [英] Redis ERR unknown command 'FLUSHDB'
问题描述
我在 AWS EC2 中部署了一个 Laravel 应用程序.redis 服务器安装在另一台 EC2 服务器上.
I deployed a laravel application into AWS EC2. The redis server is installed on another EC2 server.
与redis服务器的连接初始化成功.但是,每当我尝试清除缓存时,都会收到此错误:
The connection to the redis server is being initialized successfully. But, whenever I attempt to clear the cache, I get this error:
PredisResponseServerException : ERR 未知命令FLUSHDB",参数以:
如果我在应用服务器上本地安装redis服务器,它工作正常.
If I install redis server locally on the application server, it works fine.
知道如何修复它吗?
P.S:我尝试了两个版本的 redis:4.0.9 和 5.0.7(都给了我同样的错误)
P.S: I tried two versions of redis: 4.0.9 and 5.0.7 (both gave me the same error)
推荐答案
这意味着 FLUSHDB
已被禁用.这是一个危险的命令,因此许多管理员会通过在 redis.conf
中使用 rename-command
配置重命名命令来禁用此命令,或者只是通过将其重命名为空字符串来禁用它.
That means FLUSHDB
has been disabled. This is a dangerous command, so many admin will disable this command by renaming the command with rename-command
configuration in redis.conf
or just disable it by rename it to empty string.
rename-command flushdb ""
检查 conf 文件以了解有关命令重命名的详细信息.
Check the conf file for detail on command renaming.
这篇关于Redis ERR 未知命令“FLUSHDB"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!