Skip to content

Instantly share code, notes, and snippets.

View ttrasn's full-sized avatar

Reza Ehsani ttrasn

  • IOM, UK
  • 01:44 (UTC +01:00)
View GitHub Profile
@ttrasn
ttrasn / mongo-schema.txt
Last active January 24, 2021 13:00
secure mongodb database for access from remote
access from remote :
go to mongodb config `/etc/mongod.conf`, in `net` part, set `bindIP` to trusted IPs.
then restart service
also open mongodb port & restart firewall
------------------------------------------------
1. login to mongodb with `mongo`,
2. use admin
3. add user with password
db.createUser({
user: "user",