Difference between revisions of "MongoDB Getting Started"

From mi-linux
Jump to navigationJump to search
 
Line 1: Line 1:
 
[[Main Page]] >> [[MongoDB|MongoDB]] >>[[MongoDB_Workbook|MongoDB Workbook]] >> Getting Started
 
[[Main Page]] >> [[MongoDB|MongoDB]] >>[[MongoDB_Workbook|MongoDB Workbook]] >> Getting Started
 
  
 
== Using MongoDB ==
 
== Using MongoDB ==
Line 9: Line 8:
 
* [[MongoDB_StartingMongoDB| Starting MongoDB]]
 
* [[MongoDB_StartingMongoDB| Starting MongoDB]]
  
== Starting MongoDB ==
 
 
MongoDB can be started in several ways.
 
 
=== First time ===
 
 
Once logged in, to start MongoDB run either the following command:
 
 
runMongo
 
 
This runs with a default password, that should be changed when you first login (see below).
 
 
=== With Password ===
 
 
Once you have changed your password:
 
 
runMongo yourPassword
 
 
 
=== With other settings ===
 
 
''runMongo'' is a script file setup for your convenience that run '''mongo''' and logs you into your own database.
 
 
If you need to change any of the mongo options you will need to run '''mongo''' directly:
 
 
mongo dbYourStudentNumber --port 27017 -u yourStudentNumber  -p yourMongoPassword -whatever options required
 
 
== Changing Password ==
 
 
Once you have logged into MongoDB successfully you can change the default password:
 
 
db.updateUser("myStudentNumber",
 
{
 
    pwd: "myNewPassword",
 
  }
 
);
 
 
 
Replacing myStudentNumber with your University student number and myNewPasswor with your new password.
 
 
Note, the function names in MongoDB are <b>case sensitive</b>.
 
  
 
== Next Step ==
 
== Next Step ==
  
 
[[MongoDB_Overview|MongoDB]] Overview.
 
[[MongoDB_Overview|MongoDB]] Overview.

Latest revision as of 11:28, 27 October 2016

Main Page >> MongoDB >>MongoDB Workbook >> Getting Started

Using MongoDB

Using MongoDB involves the following steps:


Next Step

MongoDB Overview.