can't connect mongoDB to localhost - mongodb

hey there I don't know why the server refuse to connect to mongo local host and the same problem also for robomongo =[. I was looking for the same error in this site and others but no answer is relevant...I thought it might happened because robomongo is also running and I uninstalled it but...it didn't solve it...I'm using windows 10. tried to do from mongo's directory mongod.exe and it didn't work than mongo.exe but also didn't work...can someone help me?

run the MongoDB you need to open another command prompt and use the following command. “C:\Experiments\MongoDB\MongoDbServer\bin>mongo”. It will show the version of MongoDb and connected database, By default it is test. Other window will show one connection is open.
Read this Article

Related

why is MongoDbB not running and not working?

i installed MongoDB compass and when i try to connect with hostname localhost ,Port: 27017
i receive this error: connect ECONNREFUSED 127.0.0.1:27017.
I also looked in Task manager and MongoDB was not running. Thank you for your help
MongoDB compass is only a client. you should install the mongo community edition (for development setup) and then use compass client to access it.
https://docs.mongodb.com/manual/installation/
MongoDB compass is graphical user interface (GUI) for the actual mongoDB. That is to say, you need an actual mongoDB running in order to be able to interact with the data through the GUI.
Once you have the database install, you can start it by typing the command mongo in the shell. There after you should be able to return to mongoDB compass and view the data in you database (I should mention, I'm assuming that you're running on the default port and on your local machine).

I am not able to start MongoDB ON WINDOWS 10

Mongod is not starting on windows 10 it shows 'access control is not enabled for the database. Read and write access to data and configuration is unrestr 10.
Mongo is started and is running. This message is simply a notice, not an error. It says that your Mongo database is insecure because anyone is able to read and write. This is fine for your development purposes on your computer, but you should change the settings if you use Mongo for a production, customer-facing website.

How do you convert mongod to mongo service?

I have been running MongoDB on two Windows 10 PCs. However, one has mongo always running it seems where I only need to open command prompt and type mongo. This gives me access to the db on PC #1.
However, on PC #2, I must open command prompt and type mongod. Then I have to open a second command prompt to type in mongo, then I get access to the db on PC #2.
After doing this for about a year, I find I want to just want both PCs to work like PC #1, where I just type in mongo and not mongodb and only have to use one command prompt.
I checked online but there's nothing I found straightforward to accomplish this specifically.
Does anybody know the answer?
If in PC#2, your MongoDB version is < 4.0, then you can't do anything i.e., you have to continue with mongod to start Mongo as you do now.
But if your MongoDB version is >= 4.0 or you want to upgrade from lower version of MongoDB, you can follow the below steps.
Take backup of all databases with mongodump. If it is large volume data, then go through this.
Uninstall your MongoDB using Windows Uninstall Program features.
Reinstall MongoDB using the link.
While installing, ensure you select 'MongoDB Service' feature.
Start the MongoDB now in PC#2 as you do in PC#1.
Restore the old databases with mongorestore.

Mongod access denied

I'm beginner in MongoDB.I tried to install Mongodb 4.0.2 version.I'm using windows 10 OS.It typed mongod.It shows
This App can't run on your PC
.
Access denied.
After I typed Mongo. It's shows:
connecting to: mongodb://127.0.0.1:27017
and I tried to create one collection it's working and tried to find the collection.
but how can I solve the mongod app can't run on your pc
can anyone solve this problem? Thanks in advance.....

Cannot start MongoDB: System error 1067 in Windows

After setting up MongoDB service on Windows Server 2008 R2 this error was raised.
C:\mongodb\bin>net start MongoDB
The Mongo DB service is starting.
The Mongo DB service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
The error came from an unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
a few steps will fix it (as it's written in the link above):
1) remove the file /data/db/mongod.lock
2) run mongod.exe --repair
3) start the mongod service net start MongoDB
For anyone who faced this error on 2020, with version 4.4.1 of mongo, and the accepted answer not solve the issue, here is what I've done:
Remove all mongo services from pc (add/remove programs).
Go to program files and backup the MongoDB folder.
Remove the MongoDB folder.
Re-install mongo db.
And it should work.
UPDATE for January 2021, the following saved me without re-installing MongoDB and losing all my data:
C:\Program Files\MongoDB\Server\4.4\bin>mongod --dbpath "C:\Program Files\MongoDB\Server\4.4\data" --repair
I was facing the same issue and I closed the other command prompt which was opened with mongoDB.exe, and hence created a lock on that executable. Simply only closing that command prompt window worked fine. Thanks for the help.
Make sure you have at least 5 Gb available space on the drive of the database. For me, clearing that space enabled the ability to restart Mongodb.
If you are in the Windows. you should change the mongodb's config in the System disk.For example
1) I change C:\Windows\system32\mongodb.exe.
2) And I make the path in D:\mongodb\mongod.cfg .Before this,you should remove previous.
3) Finally , you can net the serve. net start mongodb.
I hope it can help you .English is not very good ,please forgive me.
enter image description here
I was having the problem of starting the the MongoDB. The logs are pretty descriptive and you can find suggestion from there.
There is a 'd' folder that needs to be created within data folder like
data\d which was missing.
This solved my problem.
Although, not an ideal solution, I ended up deleting all of the database files in \data\db and was then able to successfully run the MongoDB service. Note, this will delete all of the data in the database.