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
You try this
mongod is the server program, mongo is the client, use this to connect to the database