Mongo version: 3.2.11
I spun up a mongoDB droplet with DigitalOcean so that I could have a database connected to my little game. However, complications after complications have arisen. I am connecting to the droplet through PuTTY and was previously able to invoke "mongo" then type "show dbs" to see all the current databases.
I had been altering the /etc/mongod.conf file to allow remote connecting, and since then - any command that I invoke spits back an error message:
Just through a simple show dbs - I get this.
> show dbs
2016-12-28T00:12:26.655+0000 E QUERY [thread1] Error: listDatabases failed:{
"ok" : 0,
"errmsg" : "not authorized on admin to execute command { listDatabases: 1.0 }",
"code" : 13
} :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
Mongo.prototype.getDBs@src/mongo/shell/mongo.js:62:1
shellHelper.show@src/mongo/shell/utils.js:761:19
shellHelper@src/mongo/shell/utils.js:651:15
@(shellhelp2):1:1
I'm so confused as to why this is and I've been scouring the internet to find anything that could possibly resolve this.
PS: I had altered the /etc/mongod.conf file by uncommenting security and adding authorization: 'enabled' to it, as well as commenting out bindIp: 127.0.0.1 under net.
/etc/mongod.conf
file to allow remote connecting".