MongoDB安装过程中出现service MongoDB failed to start,verify that you have sufficient privileges to start...

win10系统下,安装MongoDB 64位,
service MongoDB failed to start,verify that you have sufficient privileges to start system services

MongoDB安装过程中出现service MongoDB failed to start,verify that you have sufficient privileges to start...
这是报错信息,上个图,

解决办法:
一、直接点Ignore(忽略),然后进入安装MongoDB的目录下,进入data,新建一个文件夹然后命名为db。(注意:路径最好是全英文。)

二、配置数据库和连接数据库
1、进入安装MongoDB的文件夹,进入bin文件夹
复制当前路径后,win+r,进入命令行窗口后,cd   路径,切换到刚刚复制的bin目录****意:如果cd切换不成功,可参考https://blog.****.net/cuicui_ruirui/article/details/105894950
2、进入mongodb新建的文件夹data下的db,然后复制该路径,输入    mongod -dbpath   路径

MongoDB安装过程中出现service MongoDB failed to start,verify that you have sufficient privileges to start...

注意:这不是报错。 

3、接下来不要关闭这个cmd,另外重开一个cmd,复制mongodb的bin目录的路径,在cmd中切换到这个路径下,键入 mongo
此时就成功连接数据库了。
如图所示

MongoDB安装过程中出现service MongoDB failed to start,verify that you have sufficient privileges to start...

另一个cmd是这样的

MongoDB安装过程中出现service MongoDB failed to start,verify that you have sufficient privileges to start...

到这里,就成功连接啦!