mongodb://[Username:Password(optional)]@HostName:Port/?aruguments note: if your password has special characters, you would need to URL-Encode. ex : monodb://my-name:my-pass@localhost:27017/?authSource=users