Questions about starting mongoDB
滿天的星座
滿天的星座 2017-05-02 09:24:42
0
2
532

I first started mongodb with the command under Linux and ran it in the background,

./mongod --fork  --dbpath ../blog --logpath ../logs/mongoDb.log --logappend --port 22222

Then now I want to check the data in the database and found that one link cannot be connected. I don’t know why

./mongod

Do I need to close the database and log in again every time I check the data?

He is directly looking for the data/db directory, but I have started mongo and specified the blog directory. Shouldn't it be looking for the blog directory? Why is it looking for data/db

./mongo

Also reported an error

滿天的星座
滿天的星座

reply all(2)
刘奇
./mongod --fork --dbpath ../blog --logpath ../logs/mongoDb.log --logappend --port 22222

mongo 127.0.0.1:22222

You try this

黄舟

mongod is the server program, mongo is the client, use this to connect to the database

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template