반응형
목록Database/MongoDB (12)
우노
[MongoDB] Create User
admin db 사용 use admin 유저 생성 db.createUser( { user: "user", pwd: "password", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, { role: "dbAdminAnyDatabase", db: "admin" }, { role: "readWriteAnyDatabase", db: "admin" } ], mechanisms:[ "SCRAM-SHA-1" ] } ) 유저 확인 db.getUsers()
Database/MongoDB
2020. 7. 2. 16:18
[MongoDB] Docker MongoDB Install
Docker 설치 sudo yum update -y sudo yum install docker -y sudo service docker start sudo usermod -a -G docker ec2-user Mongodb container 생성 및 실행 docker run -d --name mongodb -p 27017:27017 mongo docker exec -it mongodb mongo
Database/MongoDB
2020. 7. 2. 16:17
반응형