zoukankan      html  css  js  c++  java
  • Couchbase 如何设置密码;bucketPassword设置密码

    Couchbase  默认创建的 bucket(桶)是没有密码的,那么在 web.config 里面的连接字符串是这样的

     

    <!--配置缓存开始-->
            <configSections>
                <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>
            </configSections>
            <couchbase>
                <servers bucket="default" bucketPassword="">
                    <add uri="http://127.0.0.1:8091/pools"/>
                    <!--<add uri="http://192.168.0.3:8091/pools"/>-->
                </servers>
            </couchbase>
        <!--配置缓存结束--> 
    

    但是这样,好像是任何客户端,都可以连接上你的bucket(桶),感觉不是很好,那么我们如何给couchbase来设置连接密码呢?

    答案就是我们自己创建一个bucket,然后给他加上密码就可以了

    image

    image

    或者如果你已经创建了,那么还可以修改密码

    image

    最后web.config就是下面所示了

    <configuration>
    
        <configSections>
            <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>
        </configSections>
        <couchbase>
            <servers bucket="notdefault" bucketPassword="mima">
                <add uri="http://127.0.0.1:8091/pools"/>
            </servers>
        </couchbase>
    
  • 相关阅读:
    httpclient 5.0 设置超时时间
    httpclient raw请求
    使用EasyUI-datagrid-export.js导出Excel,不导出隐藏列
    ExpressSet 虚拟适配器
    中断模式队列
    autohotkey 线程入门
    读rbtree
    树莓派串口
    MCP3421使用详解
    PMOS开关电路
  • 原文地址:https://www.cnblogs.com/joeylee/p/3691633.html
Copyright © 2011-2022 走看看