<p class="md-end-block md-p"> Redis 可以支持如下连接方式:通过客户端工具连接、通过数据库管理工具 DMC 连接等。</p> <p class="md-end-block md-p">连接远程</p><pre class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded"> redis-cli -h 47.101.63.222 -p 56379</pre><p class="md-end-block md-p">连接本地</p><pre class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded"> redis-cli</pre><p class="md-end-block md-p">设置密码</p><pre class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded"> config set requirepass pass_123456</pre><p class="md-end-block md-p">获取密码</p><pre class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded"> config get requirepass</pre><p class="md-end-block md-p">登录</p><pre class="md-fences md-end-block md-fences-with-lineno ty-contain-cm modeLoaded"> auth pass_123456</pre>