• +91 9723535972
  • info@interviewmaterial.com

MongoDB Interview Questions and Answers

Question - How do we create a database in MongoDB?

Answer -

When I want to create a database in MongoDB, I faced the following error:

 :~$mongo

MongoDB shell version:1.65

Connecting to: test

Error: Could not connect to the server

Exception: connect failed
The solution to the above error:

  • cd/var1/lib1/MongoDB
  • We remove the mongod. lock from the folder
  • Sudo start MongoDB
  • Mongo

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners