From 0e2090eb83960ffae471fcfb0062b52ec8789534 Mon Sep 17 00:00:00 2001 From: wglambert Date: Tue, 22 May 2018 10:34:07 -0700 Subject: [PATCH] Update content.md (#1230) --authenticationDatabase is admin, not the container ID/name --- mongo/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mongo/content.md b/mongo/content.md index 665258ed7..7c66ef039 100644 --- a/mongo/content.md +++ b/mongo/content.md @@ -95,7 +95,7 @@ These variables, used in conjunction, create a new user and set that user's pass ```console $ docker run -d --name some-%%REPO%% -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret %%IMAGE%% -$ docker run -it --rm --link some-%%REPO%%:mongo %%IMAGE%% mongo --host mongo -u mongoadmin -p secret --authenticationDatabase some-db +$ docker run -it --rm --link some-%%REPO%%:mongo %%IMAGE%% mongo --host mongo -u mongoadmin -p secret --authenticationDatabase admin some-db > db.getName(); some-db ```