Explorar el Código

Update content.md (#1230)

--authenticationDatabase is admin, not the container ID/name
wglambert hace 7 años
padre
commit
0e2090eb83
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      mongo/content.md

+ 1 - 1
mongo/content.md

@@ -95,7 +95,7 @@ These variables, used in conjunction, create a new user and set that user's pass
 ```console
 ```console
 $ docker run -d --name some-%%REPO%% -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret %%IMAGE%%
 $ 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();
 > db.getName();
 some-db
 some-db
 ```
 ```