Mongo Installation

By ukmodak | June 6th 2022 12:23:03 PM | viewed 266 times
  1. download mongodb-windows-x86_64-4.4.1-signed.msi file and double click ->browse location-> complete->uncheck compass-> insytall->finish
  2. If you use mongo in the command prompt without configuring path, then it would give an error. Hence, configure it first.
  3. go to environment path and edit and save the location:C:\Program Files\MongoDB\Server\4.0\bin
  4. Open Command prompts and type mongod to start the service. if have any problem about diretory path dbPath:c\data\db them create the directory manually and again run the command.
  5. Open another command prompt and write command on the command prompt mongo to create the connection.

After running mongo command run the following command to create new database(schema) and table(collection)

 > show dbs   // to show all default databasea
 > use ukdb   // to create new database
 > bd.books.insert({"name":"ukmodak"})
 > show dbs   // that will show newly created database
 > show collections;
 > db.collectionsName.find()
bONEandALL
Visitor

Total : 9224

Today :9

Today Visit Country :

  • United States