Believe that many students learn node, when entering the background management Shell MongoDB will "encounter error:10061 because the target computer actively refused, unable to connect" This situation, many cases are The path to DBPath and DBLog is not configured successfully.
Download the installed address, I will not say more http://www.runoob.com/mongodb/mongodb-intro.html to a Chinese version of the installation tutorial, inside the tutorial installation steps, but for window users is really a pit , I installed it for half a day, not this error, that is the Failded to connect.
Obviously, you didn't configure the database file at all,
Create Data Catalog
MongoDB stores the data directory in the DB directory. However, this data directory is not actively created, and we need to create it after the installation is complete. Note that the data directory should be placed under the root directory (e.g. C: \ or D:\. , etc.).
In this tutorial, we've installed MongoDB on the C: disk, now let's create a directory of data and then create the DB directory in the data directory.
C:\>cd C:C:\>mkdir datac:\>cd datac:\data>mkdir DBC :\data>cd DBC:\data\db>
You can also create these directories through the Windows Explorer, not necessarily through the command line.
Then there is the database.
In order to run the MongoDB server from the command prompt, you must execute the Mongod.exe file from the bin directory of the MongoDB directory mongod --dbpath C:\mongodb\data\ DB
as shown, the server is turned on.
OK, now finally to enter the topic of this article, how to enter the background management of MongoDB
However, do not forget to create a log folder in the data directory to save the journal file.
At this point, finished with, into the MongoDB directory under the Bin directory, and then execute the Mongo.exe file, when you double-click, open a new administrator window can be executed.
One thing to remember is that you must turn on the server to Enter MongoDB manages the shell in the background, and the previous open window cannot be closed.
MongoDB configuration: error:10061 cannot connect because the target computer is actively rejecting