1. Export the server database to local storage in JSON format:
Mongoexport-h ip-d dbname-c User
-O D:\mondb\user.json
2. Import the local JSON into the local project:
d:\developsoftware\mongodb\bin>mongoimport-d dbname-c User--file D:\mondb\u
Ser.json
3. Enter the Monogo database
D:\developsoftware\mongodb\bin>mongoexport-h ip-d dbname-c User
-O D:\mondb\user.json
2015-12-23t19:28:07.434+0800 Connected to:123.57.250.189
2015-12-23t19:28:07.496+0800 Exported Records
d:\developsoftware\mongodb\bin>mongoimport-d dbname-c User--file D:\mondb\u
Ser.json
2015-12-23t19:28:50.987+0800 Connected To:localhost
2015-12-23t19:28:51.006+0800 Imported Documents
D:\developsoftware\mongodb\bin>mongo
2015-12-23t19:28:55.804+0800 I CONTROL [main] Hotfix KB2731284 or later update
is not installed, would zero-out data files
MongoDB Shell version:3.2.0
Connecting To:test
> Use dbname
Switched to DB dbname
> Db.user.findOne ()
{
"_id": ObjectId ("554b4648c72d0a3f078b556a"),
"id": "1",
"username": "AAA",
"Password": "BDDDD",
"Create_time": null
}
> Exit
4.git into the User Center, profile, and then have a library, you can have a search below and enter someone else's username
You can join someone else to the project team
Monog and GitHub Learning