I have a problem that I can not connect to MongoDB from external Tootls that is not via MongoShell or my webapp using Spring Data MongoDB abstraction.
I've successfully created a user for 'mydb' database on MongoDB And I can connect to MongoDb on my localhost using the command
$ mongo mydb -u alex -p 12345678 --host localhost --port 27017
MongoDB shell version: 3.0.1
connecting to: localhost:27017/mydb
> show users
{
"_id" : "mydb.alex",
"user" : "alex",
"db" : "mydb",
"roles" : [
{
"role" : "readWrite",
"db" : "mydb"
}
]
}
Now I can insert Collections and query and everything looks smooth. I can connect with Spring Data MongoDB abstraction from my web-app as well.
When I now try to connect using Robomongo application or Intellij Plugin for MongoDB using correct host, port, db, username and password I get an authorization error
From Intellij
Error when collecting Mongo databases: { "serverUsed" : "localhost:27017" , "ok" : 0.0 , "errmsg" : "auth failed" , "code" : 18}
From Robomongo
2015-04-02 16:00:30: Connecting to localhost:27017...
2015-04-02 16:00:30: connect failed
2015-04-02 16:00:30: Unable to authorize
I'd like to use some GUI client to have better visualisation and CRUD operation support but at the moment I can't manage to connect to MongoDB
Do you know what could the reason for this?