I first ran Redis on my local computer, and then closed all the terminal windows after I disconnected the Rails application. An hour later, I started the Rails application again and did the following to start the redis server
redis-server /usr/local/etc/redis.conf
However he told me
# Opening port 6379: bind: Address already in use
Therefore, I assumed that it was still launching its previous instance, although I closed the terminal windows on my Mac.
Looking at this page http://redis.io/commands/shutdown , I tried to run
SHUTDOWN
in the terminal window, but I get this answer
SHUTDOWN: NOT super-user
So I tried (although I did not use sudo to run it)
sudo SHUTDOWN
and after he asked me about my password, he displays this
usage: shutdown [-] [-h [-u] [-n] | -r [-n] | -s | -k] time [warning-message ...]
but when I accidentally ran shutdown -s , he said
SHUTDOWN: NOT super-user
What is the correct way to disable Redis when closing the application?
source share