mongoDB error: Error: failed to connect to [localhost:27017] -


i'm trying install habitrpg locally keep getting mongodb error after typing node src/seed.js:

error: failed connect [localhost:27017] 

i saw on other questions same error people have suggested typing in 'mongod' , fixes creating local server. error:

-bash: mongod: command not found 

can't figure out what's wrong. ideas?

  1. open cmd (in windows) or terminal (in ubuntu).

  2. type command >cd path_for_mongodb_bin_folder

    cd c:\program files\mongodb\server\3.2\bin

    for ubuntu command same :

    cd /home/mongodb/server/3.2/bin

  3. then type command >mongod --dbpath path_for_data_folder

    mongod --dbpath c:\data\db

    for ubuntu command :

    ./mongod --dbpath /home/data/db

    you can specify folder data folder.

  4. wait till cmd or terminal shows "waiting connections"

    2016-09-01t21:38:33.170+0530 network [initandlisten] waiting connections on port 27017

  5. then open new cmd or terminal window.

  6. type command >cd path_for_mongodb_bin_folder ( same step 3 )

    cd c:\program files\mongodb\server\3.2\bin

    don't close previous window of cmd or teminal.

  7. then run mongodb typing "mongo" in windows or "./mongo" in ubuntu

    mongo

    for ubuntu

    ./mongo

  8. after mongodb run can close previous cmd window.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -