<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[Windows环境下redis 配置文件中设置的密码无效]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Mon, 04 Jul 2022 09:46:41 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	<p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">当我们安装了redis服务后，发现在其配置文件redis.windows.conf（或redis.conf）设置了密码：requirepass ******</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">但是打开redis-cli.exe后输入命令config get requirepass发现：</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium"><img style="border: 0px; max-width: 100%; height: auto" src="https://gss0.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D650%2C867/sign=0205bb3591504fc2a20ab803d0edcb29/b3fb43166d224f4a0d8f442e03f790529822d1fc.jpg" border="0" /></p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">这说明配置文件中密码设置后没有生效。</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">原因：问题在于我们启动redis服务时是直接在其安装目录中双击redis-server.exe启动的，这样启动的结果是，配置文件不会指定，此时redis并不会自动使用安装目录下的redis.windows.conf（或redis.conf）文件</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium"><img style="border: 0px; max-width: 100%; height: auto" src="https://gss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D650%2C867/sign=e59f8638efdde711e7874bf092dfe223/21a4462309f79052a8df710306f3d7ca7acbd5ce.jpg" border="0" /></p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">红线框住的的提示说的很明确&ldquo;&nbsp;Warning: no config file specified&rdquo;没有指定配置文件</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">解决方法：</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">法1：实际上我们直接在安装目录中启动redis服务时错误的，正确的方式是打开&ldquo;运行&rdquo;，键入&ldquo;cmd&rdquo;切到安装目录后输出redis-server.exe redis.windows.conf，回车，就可以了。</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium"><img style="border: 0px; max-width: 100%; height: auto" src="https://gss0.baidu.com/-fo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D650%2C867/sign=a4c4d6af06f431adbc874b3f7e068097/7af40ad162d9f2d3415f17d2a3ec8a136327cc44.jpg" border="0" /></p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium">法2：在redis安装目录下新建文件startup.bat后，右击&ldquo;编辑&rdquo;，或者先用记事本建立该文件，再把扩展名改一下，文件里面写上：redis-server.exe redis.windows.conf。保存，以后再运行就直接运行这个文件，不要再直接运行redis-server.exe了，就可以了。</p><p style="margin: 10px auto; font-family: &quot;PingFang SC&quot;, &quot;Microsoft YaHei&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: medium"><img style="border: 0px; max-width: 100%; height: auto" src="https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D650%2C867/sign=e3c2f512b4096b63814c56563903ab7c/f636afc379310a555a9decc9bd4543a982261055.jpg" border="0" /></p>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] Windows环境下redis 配置文件中设置的密码无效]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>