0

Trying to connect MongoDB on local machine using rmongodb

mongo <- mongo.create (host='127.0.0.1', username = "admin", password = "admin123", db = "admin")

Error: Authentication failed

I am using Ubuntu 16.04, R version 3.4.4 and MongoDB version: 3.2.19?

  • Are you 100% sure the password and username is correct? Also is the serve behind a firewall or requires VPN? – Amar Apr 03 '18 at 07:21
  • @Amar yes sure its correct. – Kavita Madiwal Apr 03 '18 at 07:24
  • What about the database, where is it located/is it behind a firewall? Can you access it from a different location/device? – Amar Apr 03 '18 at 07:27
  • @Amar I am connecting to local network, and I am trying to access on local machine. – Kavita Madiwal Apr 03 '18 at 07:32
  • You have not specified what package you are using to access mongodb, going to guess it's `rmongodb` which appears to have an issue as stated here: https://stackoverflow.com/questions/31664719/rmongodb-authentication-always-fails – Amar Apr 03 '18 at 07:38
  • Possible duplicate of [rmongodb authentication always fails](https://stackoverflow.com/questions/31664719/rmongodb-authentication-always-fails) – Amar Apr 03 '18 at 07:39
  • @Amar yes using rmongodb and also I have checked those links but problem is not solved. I have done this https://stackoverflow.com/questions/31664719/rmongodb-authentication-always-fails – Kavita Madiwal Apr 03 '18 at 07:44
  • As the link says `rmongodb` is not compatible with the latest version of mongodb. Either: 1. Work without authentication 2. Downgrade the MongoDB server version to one that supports the old authentication 3. Look for other driver implementations that support the new authentication. – Amar Apr 04 '18 at 01:02

0 Answers0