title: Getting Exception authenticating MongoCredential in Mongo Explorer IntelliJ plugin
body: <p>Today I have a problem with plugin Mongo Explorer for MongoDB in IntelliJ. Namely, I want to connect with my docker image via Mongo Explorer plugin. Problem is that while connect attempt I am receiving an error like: </p>
  
  <pre><code>com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=PLAIN, userName='mongoadmin', source='admin', password=&lt;hidden&gt;, mechanismProperties={}}
  </code></pre>
  
  <p>I created a container and run it like:</p>
  
  <pre><code>docker run -p 27017-27019:27017-27019 
  --name mongo -e MONGO_INITDB_ROOT_USERNAME=mongoadmin 
  -e MONGO_INITDB_ROOT_PASSWORD=secret 
  -e MONGO_INITDB_DATABASE=interviewTest -d mongo
  </code></pre>
  
  <p>with terminal usage and the container is running. 
  When I am trying to run my Spring Boot application with application.properties:</p>
  
  <pre><code>spring.data.mongodb.authentication-database=admin
  spring.data.mongodb.port=27017
  spring.data.mongodb.username=mongoadmin
  spring.data.mongodb.password=secret
  </code></pre>
  
  <p>application is starting fine so I am assuming that there is no problem with connection pool to my MongoDB database with Spring Boot application and credentials are correct. The problem occurs when I am trying to establish a connection with the Mongo Explorer plugin added to IntelliJ.  </p>
  
  <p>My properties in Mongo Explorer look like:</p>
  
  <p><a href="https://i.stack.imgur.com/d3siw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d3siw.png" alt="general"></a></p>
  
  <p><a href="https://i.stack.imgur.com/Sxq9E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Sxq9E.png" alt="authentication"></a></p>
  
  <p>I am not even sure if I suppose to configure something more because this is my first step with DB connector for the nonrelational database in IntelliJ.
  I will be grateful for suggestion on how to rid of an error and establish a connection with MongoDB with Mongo Explorer plugin.</p>