提供一個mongodb官方練習數據庫,如果自己註冊請到https://cloud.mongodb.com/,需要vpn翻牆。
下載客戶端
安裝後有mongo.exe。
執行以下命令:
shell 3.6
mongo "mongodb+srv://cluster0-5hyps.mongodb.net/test" --authenticationDatabase
admin --username root --password <PASSWORD>
shell 3.4
mongo "mongodb://cluster0-shard-00-00-5hyps.mongodb.net:27017,cluster0-shard-00-01-5hyps.mongodb.net:27017,cluster0-shard-00-02-5hyps.mongodb.net:27017/test?replicaSet=Cluster0-shard-0"
--ssl --authenticationDatabase admin --username root --password <PASSWORD>
mongo "mongodb://cluster0-shard-00-00-5hyps.mongodb.net:27017,cluster0-shard-00-01-5hyps.mongodb.net:27017,cluster0-shard-00-02-5hyps.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username
root --password smallorange
說明:官方提供最大512MB數據庫