mongo db installation in ubuntu 18.04

This blog is the part of the course on how to create your own Cryptocurrency. This blog contains all the command to install mongodb and create database in mongodb

If you want to understand the complete process of coin building please go to this of How to create Cryptocurrency if you are not already enrolled.

To enroll directly for the course please visit this link Create Own Cryptocurrency

Command to install Mongodb in ubuntu 18.04

sudo apt-get install mongodb

Commands to create database in Mongodb

#to enter the mongo client use below command
mongo

#to use or create the database usbe below command. In below command ntmdb is #the name of the database

use ntmdb


Command to create username and password

#before you execute create user command , make sure you have selected the #right database using the use "database" command

db.createUser( { user: "myuser", pwd: "mypassword", roles: [ "readWrite" ] } )


#Replace myuser and mypassword with your actual values
Facebook Comments
(Visited 32 times, 1 visits today)

Leave A Comment

Your email address will not be published. Required fields are marked *