解決
1. 先檢查自己的配置信息,如若一切無誤后,則使用管理員模式開啟cmd,不要直接打開cmd。

2. 然后在cmd中轉跳至自己MongoDB的bin目錄,使用我的舉例是:
cd "C:\Program Files\MongoDB\Server\3.4\bin"
3. 然后cmd寫入服務
mongod --dbpath "D:\MongodbData\data" --logpath "D:\MongodbData\logs\mongodb.log" --install --serviceName "MongoDB"
4. 最后是開啟服務
5. 開啟完可進行簡單的測試是否開啟
在瀏覽器中輸入http://127.0.0.1:27017
,如若顯示It looks like you are trying to access MongoDB over HTTP on the native driver port. 則開啟成功

或者去計算機管理頁面中查看是否開啟

到此這篇關于解決net start MongoDB 報錯之服務名無效的問題的文章就介紹到這了,更多相關net start MongoDB 服務名無效報錯內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持腳本之家!
您可能感興趣的文章:- mysql運行net start mysql報服務名無效的解決辦法
- MySQL 5.7.14 net start mysql 服務無法啟動-“NET HELPMSG 3534” 的奇怪問題
- 使用批處理實現啟動和停止服務的代碼分析(net startnet stop)
- ASP .NET調用javascript中Response.Write和ClientScript.RegisterStartupScript的區別