How can I stop redis-server?

前端 未结 26 1849
清歌不尽
清歌不尽 2020-12-07 06:51

I apparently have a redis-server instance running because when I try to start a new server by entering redis-server, I\'m greeted with the followin

26条回答
  •  醉酒成梦
    2020-12-07 07:22

    A cleaner, more reliable way is to go into redis-cli and then type shutdown

    In redis-cli, type help @server and you will see this near the bottom of the list:

    SHUTDOWN - summary: Synchronously save the dataset to disk and then shut down the server since: 0.07

    And if you have a redis-server instance running in a terminal, you'll see this:

    User requested shutdown...
    [6716] 02 Aug 15:48:44 * Saving the final RDB snapshot before exiting.
    [6716] 02 Aug 15:48:44 * DB saved on disk
    [6716] 02 Aug 15:48:44 # Redis is now ready to exit, bye bye...
    

提交回复
热议问题