I am trying to connect to my MongoDB hosted on Railway. I just created the MongoDB, so it only contains a 'test' db with no collection.
When I do not append the URL with db name, I can use mongosh to connect and set to 'test' DB.
But when I do append the db name, , 'MONGO_URL/test', I get:
[DEBUG-ConnectionPool:12243] 1683846894064 connection attempt failed with error [{"ok":0,"code":18,"codeName":"AuthenticationFailed"}] {
type: 'debug',
message: 'connection attempt failed with error [{"ok":0,"code":18,"codeName":"AuthenticationFailed"}]',
className: 'ConnectionPool',
pid: 12243,
date: 1683846894064
}
I am new to this, any help is greatly appreciated!