I deployed a laravel application into AWS EC2. The redis server is installed on another EC2 server.
The connection to the redis server is being initialized successfully. But, whenever I attempt to clear the cache, I get this error:
Predis\Response\ServerException : ERR unknown command 'FLUSHDB', with args beginning with:
If I install redis server locally on the application server, it works fine.
Any idea how to fix it?
P.S: I tried two versions of redis: 4.0.9 and 5.0.7 (both gave me the same error)
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 ""
Check the conf file for detail on command renaming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With