Report this

What is the reason for this report?

How do I access mongo shell?

Posted on May 3, 2015

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.


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

@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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.