Kashif Zaidi
Kashif Zaidi

Reputation: 541

Error while creating a database in mongodb (not a valid database name in mongo.js)

I am trying to create a database in mongo db using command use db shorten

when i run the mongod instance it outputs this Mongod instance

but when try to run mongo in the separate terminal it gives error creating a database

enter image description here

the data/db permissions are set to 755 and i couldn't find anything related to it

Upvotes: 2

Views: 2334

Answers (1)

ksimons
ksimons

Reputation: 3826

If your db is called 'shorten' you should just type use shorten. It's the extra 'db' in there that's messing you up.

Upvotes: 2

Related Questions