Skip to content

sh3r4rd/change-streams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mongo Change Streams

  1. Create a keyfile With keyfile authentication, each mongod instances in the replica set uses the contents of the keyfile as the shared password for authenticating other members in the deployment. Only mongod instances with the correct keyfile can join the replica set
openssl rand -base64 756 > <path-to-keyfile>
chmod 400 <path-to-keyfile>
  1. Create a mongo replica set
# Run the mongod command with the --replSet and --keyFile flags
mongod --keyFile <path-to-keyfile> --replSet <replicaSetName>
  1. Authenticate as administrator
mongosh --port 27016 -u adminuser -p mypassword --authenticationDatabase admin
  1. Initialize the replica set
mongosh --port 27017
> rs.initiate()
  1. Follow change stream tutorial

About

Playing around with Mongo change streams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors