------

[ AD ] Port Monitor ( Try to use a Best WebSite Monitoring Tool )

------


1,사용자 계정 관리

-몽고DB를 시동하고 나서 가장 먼저 해야 할 일은 데이터베이스에 접근할 수 있도록 사용자를 추가하는 것이다.



1) 계정 생성

use test
db.createUser( {use: "testUser", 
    pwd: "test", 
    roles: ["readWrite", "dbAdmin"] } )

2) 계정 삭제

use test
db.dropUser("testUser")


3) 계정 목록

use admin
show users

사용자 계정은 각 데이터베이스의 db.system.users 컬렉션에 저장된다.


참조 : https://mylko72.gitbooks.io/node-js/content/chapter12/chapter12_2.html


명령어 : http://www.tutorialspoint.com/mongodb/mongodb_create_database.htm

+ Recent posts