mongodb get connection string to localhost code example Example: mongodb local connection string mongodb://localhost:27017/mydbname