Categories
Queues REDIS

Redis Practical commands

Redis Command Line

redis-cli -h 127.0.0.1 -p 6379

List keys

keys *

Show Value Key

mget "nameOfYourKey"
Categories
Queues REDIS

Flush keys in Redis

redis-cli FLUSHALL
Categories
Queues REDIS

How to resolve laravel Connection refused [tcp://127.0.0.1:6379] ?

#1 inst all Redis on your mac as follow

brew install redis

Launch Redis on computer starts.

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

Start Redis server via “launchctl”.

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Start Redis server using configuration file.

$ redis-server /usr/local/etc/redis.conf

Stop Redis on autostart on computer start.

$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Location of Redis configuration file.

/usr/local/etc/redis.conf

Uninstall Redis and its files.

$ brew uninstall redis
$ rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Get Redis package information.

$ brew info redis

Test if Redis server is running.

$ redis-cli ping