0 votes
in MongoDB by
How do we create a database in MongoDB?

1 Answer

0 votes
by

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

Related questions

0 votes
asked Jan 7, 2023 in MongoDB by sharadyadav1986
+1 vote
asked Aug 20, 2022 in MongoDB by Robin
...