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
怪我咯2017-05-02 09:26:42
./mongod --fork --dbpath ../blog --logpath ../logs/mongoDb.log --logappend --port 22222
mongo 127.0.0.1:22222
You try this
黄舟2017-05-02 09:26:42
mongod is the server program, mongo is the client, use this to connect to the database