CSDNRGY 2017-04-09 11:09 采纳率: 88.9%
浏览 12721
已采纳

电脑重启后,redis中的数据为什么没有被清空?

图片说明

  • 写回答

3条回答 默认 最新

  • 战在春秋 2017-04-09 13:41
    关注

    引自官方文档:

    By default Redis saves snapshots of the dataset on disk, in a binary file called dump.rdb.

    要想清空数据,按如下步骤操作:
    1 停止redis server , 找到redis.conf文件中如下部分:
    # It is also possible to remove all the previously configured save
    # points by adding a save directive with a single empty string argument
    # like in the following example:
    #
    # save ""
    然后将 save ""行注释(#)去掉

    2 删除.rdb文件

    3 重启redis server

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?