1. 암호가 설정 안되는 경우

   # mongo

MongoDB shell version: 2.4.1
connecting to: test
> _

===================================================================

  # mongo <db_name>

MongoDB shell version: 2.4.1
connecting to: <db_name>
> _

 

 

 

2. 암호가 설정된 경우

  # mongo -u<user_ID> -p

MongoDB shell version: 2.4.1
Enter password:  _

===================================================================

  # mongo <db_name> -u<user_ID> -p

MongoDB shell version: 2.4.1
Enter password:  _

 

 

 

두 개 예제의 다른 점은 MongoDB의 존재하는 DB에 직접 접근하느냐의 차이다.

 

'Databases > MongoDB' 카테고리의 다른 글

[MongoDB] Replica set  (0) 2013.08.12
[MongoDB] 관리툴 링크 알려주는 페이지  (0) 2013.05.09

Replica set of MongoDB is site about information  :  http://docs.mongodb.org/manual/replication/

 

1. 용어 정리

Replica - 복제

shard - 분산 저장할 때 사용되는 물리적 장비

sharding - 대용량 DB에서 분산 저장하는 기술

 

 

Replica set은 Replication(복제)된 서버가 여유로 가지고 있음을 의미한다. 즉, Master , Slave로 구성된 하나의 묶음을 의미한다. 구성하는 이유는 DB에 장애가 났을 경우 Slave를 Master로 대체하여 사용할 수 있으므로 유연한 대처가 가능하므로 묶음으로 구성하여 사용한다.

 

Replica Set은 Master, Slave로 주로 구성하지만 Arbiter(아비터)를 추가하는 경우도 존재한다. 아비터는 HeartBeat를 체크하는 역할을 하는데 Master가 고장 났을 때 Slave를 Master로 만드는 역할 수행을 한다.

 

Replica set은 다양한 구성 방법이 존재한다. 위에 링크된 주소로 들어가면 아래와 같은 정보들을 열람할 수 있다.

Replica Set Members
Presents the components of replica sets.
Replica Set Deployment Architectures
Presents considerations for planning replica set deployments.
Replica Set High Availability
Presents the details of the automatic recovery process with replica sets.
Replica Set Read and Write Semantics
Presents the semantics for targeting read and write operations to the replica set.
Replication Processes
Presents the mechanics of the replication process and related topics.

 

 

 

'Databases > MongoDB' 카테고리의 다른 글

[MongoDB] DB 접속하기  (0) 2013.09.03
[MongoDB] 관리툴 링크 알려주는 페이지  (0) 2013.05.09

'Databases > MongoDB' 카테고리의 다른 글

[MongoDB] DB 접속하기  (0) 2013.09.03
[MongoDB] Replica set  (0) 2013.08.12

+ Recent posts