mongo start-up display path error Solution

Today prompt at boot mongo connect failed, and then use the command mongod continue to find fault, suggesting that exception in initAndListen: NonExistentPath: Data directory / data / db not found, it is clear mongo start can not find the path, then re-set the path:

mongod --dbpath /usr/mongo/db

Note that I created mongo / db folder under the Local usr directory, so use this path, small partners can customize the path
is also important to note that if you want to boot from the start, will have to enter additional boot from the start of the command, here is not posted, you can own Baidu, enter the above command to open another command line to start the mongo

Published 11 original articles · won praise 2 · Views 2994

Guess you like

Origin blog.csdn.net/weixin_42821179/article/details/104050788