mongodb - How to run a mongod instance -


i starter of mongodb. according "import example" section of mongodb 3.2 manual, prerequisite importing data database have running mongod instance. limited background knowledge of mongodb, failed understand line of instruction. please give me explanation on how run mongod instance step step in mac terminal? thanks.

here several steps start mongodb var mongod

  • created ./bin/data/db directory storing mongodb data file.
  • start 1 terminal mongodb server
  • go mongo/bin, , execute command

    ./mongod 
  • start terminal mongodb shell

  • go mongo/bin, , run

    ./mongo 
  • now can connect mongodb now, more command show dbs, show collections, use dbname, more commands in mongodb, refer db.help()...


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -