start mongodb command line windows code example

Example 1: windows start mongodb server

// Add the folder containing mongod to your PATH variable (see source for how)
// usually located here: 'C:\Program Files\MongoDB\Server\4.4\bin'
// open cmd.exe and run this command;
start mongod

Example 2: start mongodb in terminal

Start a terminal for your mongo server
Go to <mongodb-install-directory>/bin directory
Run the command./mongod
Start a terminal for your mongo shell
Go to <mongodb-install-directory>/bin directory
Run the command (make sure you put the name of the database)./mongo test

Tags:

Sql Example