mongo_config_auth

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mongo_config_auth [2019/10/30 09:29] – [Enable Authentication] andonovjmongo_config_auth [2019/10/30 17:29] (current) – external edit 127.0.0.1
Line 118: Line 118:
 </sxh> </sxh>
  
-P.S. Don't forget to have username and password beforehand :) 
- 
-<sxh bash> 
-db.createUser( 
-  { 
-    user: "useradmin", 
-    pwd: "thepianohasbeendrinking", 
-    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] 
-  } 
-) 
-</sxh> 
 =====Connection===== =====Connection=====
 In order to connect, we have to enter the username and password as follows: In order to connect, we have to enter the username and password as follows:
  • mongo_config_auth.1572427745.txt.gz
  • Last modified: 2019/10/30 17:29
  • (external edit)