I have installed MongoDB on my Window 7(64 bit) machine. I have created the path data/db too but when I tried to start mongodb using the command 'C:\mongodb\bin\mongod.exe'
, it is not starting. It is showing admin web console waiting for connections on port 28017
. Help me in getting start the MongoDB. And also please suggest if any GUI available for MongoDB. Thanks in advance.
相关问题
- MongoDB can not create unique sparse index (duplic
- Spring Data MongoDB - lazy access to some fields
- Golang mongodb aggregation
- How to convert from Timestamp to Mongo ObjectID
- MongoDB Indexing: Multiple single-field vs single
相关文章
- mongodb有没有什么办法禁止读取数据的时候进行缓存
- mongodb-aggregate聚合查询分组后如何获得多字段
- mongodb error: how do I make sure that your journa
- How to track MongoDB requests from a console appli
- MongoError: cannot infer query fields to set, path
- Pymongo $in Query Not Working
- django.core.exceptions.ImproperlyConfigured: '
- How to represent an array with mixed types
Step 1: First download the .msi i.e is the installation file from
https://www.mongodb.org/downloads#production
Step 2: Perform the installation using the so downloaded .msi file.Automatically it gets stored in program files. You could perform a custom installation and change the directory.
After this you should be able to see a Mongodb folder
Step 3: Create a new folder in this Mongodb folder with name 'data'. Create another new folder in your data directory with the name 'db'.
Step 4: Open cmd. Go to the directory where your mongodb folder exists and go to a path like C:\MongoDB\Server\3.0\bin. In the bin folder you should have mongodb.exe
Step 5: Now use
It is showing admin web console waiting for connections on port 28017.
The above message means that mongodb has started successfully and is listening on port 28017.
You can use the mongo shell(
mongo.exe
) to connect to the mongoDB and perform db operations.There are several GUI tools available for MongoDB like MongoVUE, etc.
This is ALL I needed to init mongo in PowerShell, many replies are IMO too sophisticated.
C:\Program Files\MongoDB\Server\3.6\bin
to environmental variable "path". Notice: this version will be outdated soon.It is properly written over here
If you download the .msi file then install it and if you download the zip file then extract it.
MongoDB requires a data directory to store all data. MongoDB’s default data directory path is \data\db. Create this folder using the following commands from a Command Prompt:
md \data\db
You can specify an alternate path for data files using the --dbpath option to mongod.exe, for example:
C:\mongodb\bin\mongod.exe --dbpath d:\test\mongodb\data
If your path includes spaces, enclose the entire path in double quotes, for example:
C:\mongodb\bin\mongod.exe --dbpath "d:\test\mongo db data"
You may also specify the dbpath in a configuration file.
To start MongoDB, run mongod.exe. For example, from the Command Prompt:
C:\mongodb\bin\mongod.exe
To connect to MongoDB through the mongo.exe shell, open another Command Prompt.
C:\mongodb\bin\mongo.exe
Add the following lines in "mongo.config" file
Start server :
Connect to localhost MongoDB server via command line
Connect to remote MongoDB server via command line with authentication.
That's it !!!
I have followed the below steps...May be it will work for you
Create directory like below
C:\DATA\DB
It worked for me....