0 0
Read Time:14 Second

Switch Databases in MongoDB

To display the database you are using, type db:

db

The operation should return test, which is the default database.

To switch databases, issue the use <db> helper, as in the following example:

use <database>
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Comment