Mongodb & Robomongo: Can't connect (authentication)

前端 未结 6 861
野的像风
野的像风 2020-12-03 05:30

I have the following user:

{
    \"_id\" : \"admin.root\",
    \"user\" : \"root\",
    \"db\" : \"admin\",
    \"roles\" : [
        {
            \"role\"          


        
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 05:51

    You can try the Mongo-Express (a web-based tool). It is available here: https://github.com/andzdroid/mongo-express

    However, you need to upgrade the mongodb-nodejs library to be at least (1.4.29) according to this: http://docs.mongodb.org/manual/release-notes/3.0-scram/

    I tried and it worked for my case. You can find below useful command for that:

    npm install mongo-express cd node-modules/mongo-express

    Change config.default.js file to config.js and update it to include your databse connection (e.g. username, password, connection's url, etc...)

    Edit package.jon file and change the version of mongodb to "~1.4.29"

    Run: npm update

    To start the web app: execute command "node app" and the web site will be available at http://localhost:8081/

提交回复
热议问题