Comments (7)
Yes, you will have to configure the application to use authentication when it connects. Exactly how, depends on your application; in ours we just give it the entire mongodb url like this:
-e MONGO_URI=mongodb://11.249.120.179:27017/testdb
when I enabled authentication on the database, I had to change the URL to include a username and password:
-e MONGO_URI=mongodb://testAdmin:[email protected]:27017/testdb
from mongo.
from mongo.
Thanks! Then how do I get the password?
from mongo.
Background: I want to connect via Robomongo, so I need to get the authentication details, which as far as I know, are generated at random and are usually output by the container logs.
from mongo.
There is no password or user created automatically. If you want to turn on authentication then you add --auth
to the docker run (docker run -d mongo --auth
), and then you'll need to connect to it via localhost (docker exec ...
) to create an admin user (https://docs.mongodb.org/manual/tutorial/enable-authentication/).
from mongo.
If I have an application linked to the mongo instance, and I add authentication to it, will I need to do something special with the application, or would it continue to work?
from mongo.
from mongo.
Related Issues (20)
- PGP KEYS expired for Mongodb v3.6 HOT 2
- CVE-2023-29403 HOT 3
- Add an example to documentation for "Initializing a fresh instance" HOT 1
- docker run mongo failed
- Mongo 6.0+ Fails to Run Using WSL HOT 6
- Is it possible Docker without WSL?
- Need help with CVE-2023-24538, CVE-2023-24540, CVE-2024-21626 and CVE-2023-27561 HOT 4
- Not connecting in the mongodb compass - getaddrinfo ENOTFOUND db-mongo-node17 HOT 6
- Mongo container sends network requests to mysterious EC2 servers at AWS HOT 9
- MongoDB container not always initialising after clearing volumes HOT 1
- 7.0.7 tag is missing linux/arm64 image HOT 1
- mongod:6.0.13 - Failed during mongod binary build in docker image.
- docker PIDS keeps increasing at 7.0.8 HOT 1
- Can't connect apps to MongoDB inside docker in Linux HOT 2
- `ENTRYPOINT` documentation HOT 1
- The docker container is throwing connection error if host machine is also running a mongodb on port 27017.
- Docker encountered an exited while in use
- mongo in the container does not properly listen on IPv6
- custom mongod.conf file append to docker mongo it restarts HOT 1
- Operation not permitted\nActual exception type: std::system_error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo.