A password containing special characters, especially the dollar sign, has to be put in single quotes to protect them from the command shell:
$ mongo admin -u uname -p 'password'
A password containing special characters, especially the dollar sign, has to be put in single quotes to protect them from the command shell:
$ mongo admin -u uname -p 'password'