does anyone know how I can use a database-name like “abc-123” from the mongodb console doing something like this in one command:
use abc-123;
db.Configuration.find()
I tried somethings like
['abc-123'].Configuration.find()
but nothing worked.
Thx for any help!
You can use db.getSibling() to do this –
Here’s a link to the command refererence list for MongoDB where it talks about getSibling a little more – http://docs.mongodb.org/manual/reference/commands/.
Additionally, it’s recommended to keep the db name alphanumeric.