首页 > 数据库 >[Bug0048] Redis安装成功后Warning: no config file specified, using the default config. In order to specify

[Bug0048] Redis安装成功后Warning: no config file specified, using the default config. In order to specify

时间:2022-08-31 12:24:01浏览次数:72  
标签:no redis Redis 报错 using config

1、问题

redis启动错误: Warning: no config file specified, using the default config. In order to specify a config

2、场景

迁移环境,新windows环境下双击redis-server.exe报错,原环境已经将Redis设置为服务,新环境未设置

3、原因

没有使用默认的conf文件

4、解决方案

  • 方案一
    设置命令行启动Redis批处理脚本,双击启动即可
    在Redis目录下添加redis-start.bat(文件名.bat)批处理文件,文件内容如下,根据自身存放位置修改相对路径即可。

    之后点击文件即可运行。

    @echo off
    
    set location="D:\Environment\Redis-x64-5.0.14.1" 
    
    cd /d %location% 
    redis-server redis.windows.conf
    
  • 方案二(推荐)
    将Redis安装为服务

    进入redis文件夹,输入redis-server.exe --service-install redis.windows.conf --loglevel verbose

    详细见Windows 下将 redis 设置成服务并开机自启

成功后效果图

标签:no,redis,Redis,报错,using,config
From: https://www.cnblogs.com/Code-Rain/p/16642201.html

相关文章