Forgot Username / Pwd to CouchDB

前端 未结 9 575
北海茫月
北海茫月 2020-12-15 07:50

Does anyone know how can I reset the username and password for CouchDB ?

相关标签:
9条回答
  • 2020-12-15 08:18

    for Unix: http://silviud.blogspot.com/2012/10/couchbase-recover-web-console-password.html

    /opt/couchbase/bin/erl \
    -noinput -eval \
    'case file:read_file("/opt/couchbase/var/lib/couchbase/config/config.dat") of {ok, B}  ->     io:format("~p~n", [binary_to_term(B)]) end.' \
    -run init stop | grep cred
    
    0 讨论(0)
  • 2020-12-15 08:22

    What I've done it's quite simple. I found out my old username and password here:

    /opt/couchbase/var/lib/couchbase/config/config.dat
    

    After that I went to opt/couchbase/bin/ and run

    ./couchbase-cli cluster-init -c localhost:8091 -u old_user -p old_password --cluster-init-username=new_user --cluster-init-password=new_password
    

    Done! Also you can check this: http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-faq.html

    0 讨论(0)
  • 2020-12-15 08:25

    This worked for me: while couchdb is stopped,

    1. clear the [admin] section in your */etc/couchdb/local.ini
    2. delete the _users.couch database (located in */var/lib/couchdb/)

    This will reset the user database to factory defaults (admin party!) and wipe all of couchdb's user accounts. There might be a more subtle way

    0 讨论(0)
  • 2020-12-15 08:29

    You just need to add the username and password in CouchDB local.ini file. You can add as many administrators as you want.

    sudo nano /etc/couchdb/local.ini

    and in the end of file, add username and password.

    And don't forget to restart the CouchDB server. sudo service couchdb restart

    0 讨论(0)
  • 2020-12-15 08:32

    On Mac OS X, cbreset_password is not in PATH by default, so I've done just:

    "/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/cbreset_password" 127.0.0.1:8091
    

    ...and re-set the password once confirming yes

    0 讨论(0)
  • 2020-12-15 08:37

    One more point to add ...

    If you are running Couch DB on Windows, then probably it was installed as a service and to reset it you need to stop service first, within running service other answers do not work.

    http://www.7tutorials.com/what-are-windows-services-what-they-do-how-manage-them

    Open Control Panel - Administrative Tools - Services and stop Apache Couch DB

    0 讨论(0)
提交回复
热议问题