Click here to Skip to main content
15,891,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I found that database with a same that already exists can be created, thus databases with the same names causes problems when I need to specify which databases I want to use.

Here is how it happens:

1. I already have a database, with name "test1",which only stores collections with documents.
2. Then, I use it to store files using GridFS so it contains binary files.(Actually, I think this could be the cause, but I have no idea why)
3. And now problem happens. When I try to access "test1" using command like `use test1`. An empty database with the same name "test1" will be created.

Like what `show dbs` demonstrates:

test1 empty
test1 0.0625GB

I am using mongodb 2.0.5

Any hint on why this happens, since common sense will show that db with the same name cannot coexist? And any solution?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900