MongoDB password with “@” in it

前端 未结 16 2020
遇见更好的自我
遇见更好的自我 2020-11-27 14:03

I\'m trying to connect to a MongoDB database with a username and password using Mongoose in Node.js. All the docs say that the connection string should look like

<         


        
16条回答
  •  我在风中等你
    2020-11-27 14:15

    For those connecting with Mongo Compass.(MacOSx) Simply go to your cluster->Security(Tab)at mongodb.com

    Then

    edit your password(press the edit button on your username):

    You will get a modal/popup/dialog:Press edit password underneath your name(the button is greyed out by default but appears just underneath your name)->Then press Update User

    Next:

    Close your mongo db compass application if its running:(Quit Mongo)

    Next Step:

    Return to the Overview Tab in mongodb.com.and select Connect

    Return to OverView:

    Next Step:

    In the popup dialog select Connect with MongoDB Compass then in the next view select a version you want to use(preferably VersionNumber earlier):

    Then:

    Copy the URI String presented to you:

    Reopen MongoDB Compass application:

    And it will give you the option/popup to use the URI String detected:Click Yes

    Final step:

    Enter your new password and Connect. Now your connection should now be successful.

提交回复
热议问题