Connection of mongodb
1. Connect to the local database
Mongodb://localhost
Mongo-- host remote IP-- port remote port-u account name-p password name
two。 Connect to the remote database and log in to localhost's admin database with the username fred and password foobar.
Mongodb://fred:foobar@localhost
3. Connect three mongo servers
Mongodb://localhost,localhost:27018,localhost:27019