How do I access mongo shell?

May 3, 2015 9.8k views
MongoDB MEAN DigitalOcean Ubuntu

So I SSH as root into my droplet's terminal and I want to access the mongo shell to drop my documents from my mongodb database. How do I got about this?

I tried

mongo

and i got

Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly.
1 comment
1 Answer

@laohasongkramsu

At the command prompt:

export LC_ALL=C

and then try again. If that doesn't work, you may need to edit:

/etc/default/locale

and set

LANG=
LANGUAGE=
LC_ALL=

to your preferred settings. As an example:

LANG=en_US.UTF-8
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
Have another answer? Share your knowledge.