Closed fiatjaf closed 9 years ago
You need special permissions to create databases, and I guess your account on MongoLab doesn't allow that but from within the admin interface. If you ran this against an instance of MongoDB where you have admin privileges it should work (like when you run it locally for instance)
You're right.
So, instead of taking the time to learn all the inner workings of MongoDB, I'll ask you a question: what if instead of creating new databases, mongodown used a new collection for every new database LevelUP asked? Would it work? Would it be acceptable? The code would have to be changed too much?
(I'm not asking for you to change anything, I'm thinking about forking the project and adapting it if you tell me it is a good idea.)
@fiatjaf it's not possible with mongodown in the current version, but I'll release a version ASAP which will allow you to override the name of the collection. That way you'll be able to do this. I'll let you know
Should create a dabatase and put a document in it, right? But it doesn't. It fails with a
MongoError: auth failed
.Everything works if I precreate the database in the MongoLab console, but I cannot make
mongodown
create the databases for me.I don't understand the workings of MongoDB, so this is maybe a stupid question, but thank you for the help.