Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while using MongoDB command

Tags:

mongodb

I am trying to start working with MongoDB but when i installed it and tried to set up path for DB and logs i got error.

Commend used: mongod --directoryperdb --dbpath G:\MongoDB\data\db\ --logpath G:\MongoDB\data\log\mongo.log --logap pend --install

Error: 2018-08-05T18:54:47.346+0200 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDis abledProtocols 'none'

System: Windows10

I use Windows PowerShell.

I did try to add "--sslDisabledProtocols none"

but that made new error appear:

BadValue: need to enable SSL via the sslMode flag when using SSL configuration parameters try 'G:\MongoDB\bin\mongod.exe --help' for more information

Which this time throws me --help ... :P I am reading trought it but maybe one of you guys had similar error?

like image 935
Marcin Trofiniak Avatar asked Aug 05 '18 17:08

Marcin Trofiniak


2 Answers

That error is not important. The important thing is if you can run MongoDB. If you have service called 'MongoDB Server' in your services, remove it and then run the script you wrote here, error is fine, try to start by command "net start MongoDB"

like image 93
Tyro Avatar answered Sep 29 '22 09:09

Tyro


Step 01 : Go to "c" drive

Step 02 : Create a new folder and rename it as data

Step 03 : Go to inside you created data folder and create a new folder and rename it as db

step 04 : Go to cmd and run mongod

Thanks,

like image 39
pubudu sachintha Avatar answered Sep 29 '22 10:09

pubudu sachintha