Skip to content

Instantly share code, notes, and snippets.

@david30907d
Last active January 17, 2017 12:17
Show Gist options
  • Save david30907d/39fd61280e933418c5f7c76bfa099e87 to your computer and use it in GitHub Desktop.
Save david30907d/39fd61280e933418c5f7c76bfa099e87 to your computer and use it in GitHub Desktop.

現去這邊把docker載下來 docker

用這個連結的教學 創建superuser superuser

把帳號密碼丟進去 就可以登入mongo了 pymongo

pymongo程式碼

from pymongo import MongoClient
import urllib
p=urllib.parse.quote('你的密碼')
client = MongoClient('mongodb://帳號:密碼@主機')

Mongo shell的指令

mongo admin -u username -p password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment