Mongodb: Failed to connect to 127.0.0.1:27017, reason: errno:10061

后端 未结 17 2207
醉话见心
醉话见心 2020-11-29 19:12

Here is my mongod.cfg file:

bind_ip = 127.0.0.1
dbpath = C:\\mongodb\\data\\db
logpath = C:\\mongodb\\log\\mongo-server.log
verbose=v

相关标签:
17条回答
  • 2020-11-29 19:47

    If it writes that you had not properly shut down or that mongod.lock is not empty , only delete mongod.lock from C:\data\db\ and it will start.

    0 讨论(0)
  • 2020-11-29 19:48

    first you run the command mongod and check weather the port 27017 has started or not if yes then hit the command mongo....and database will start.

    0 讨论(0)
  • 2020-11-29 19:49

    When This Error is Coming it is lack of the following

    1)Setting the path to mongo db go to "C" Drive and the installation of Mongo db directory and then go to bin folder in the mongo and copy the path of it

    c:/mongodb/server/3.2/bin/ and create a new environmental variable in system properties then name is path and value="c:/mongodb/server/3.2/bin/" here my version is 3.2

    2)create a data directory for the data in C Drive c:/Data/twitter

    3)start the server with **

    c:/> mongod

    check your port config if there is any error as the local port may be assigned to any other 4)start your Mongo database with

    Mongo then your mongo db will start

    then in your mongo database create a database

    use DATABASE_NAME

    for example:

    use twitterdata

    switched to db twitterdata

    to check your current database

    db

    twitterdata

    to get total databases

    show dbs

    0 讨论(0)
  • 2020-11-29 19:49

    Here are the steps to solve this issue:

    1. Just go to your MongoDB bin folder and run the mongod.exe file.
    2. Navigate to your mongodb bin folder via Command prompt and start mongo by typing "mongo"
    0 讨论(0)
  • 2020-11-29 19:50

    Point to your mongodb instalation e.g C:\Program Files\MongoDB\Serve\bin and run mongod.exe so you can open connection to 127.0.0.1:27017.

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