Show dbs doesn't work after launching mongod

I’m launching Mongod for the lab using the command line below::

mongod --port 27000 --dbpath /data/db/ --logpath data/db/logfile.log --bind_ip, --auth --fork

Then I connect mongo successfully however once I run “show dbs” I get this:
MongoDB Enterprise > show dbs
2020-01-31T09:35:33.528+0000 E QUERY [thread1] Error: listDatabases failed:{
“ok” : 0,
“errmsg” : “there are no users authenticated”,
“code” : 13,
“codeName” : “Unauthorized”
} :

Should I explicitly provide the user name and password ?

Yes you should, since you started with –auth.

On a side not, you will need to fix the top directory of your logpath.
Also, I would suggest that you remove the mongod command from your post to keep in-line with forum guidelines.

Hi @Michael_Karpenkov_78283,

You can specify the username and password in your connection string using the --username and --password options.

Please let me know if you are still facing any issue.

Shubham Ranjan
Curriculum Services Engineer

Hi !
Yes, this is the fix. Thank you very much.

Closing this thread as the issue has been resolved.