Connecting to mongo by public url

mikimakimikiHOBBY

2 months ago

I am trying to connect to mongo by public url copied from settings and it fails to auth, it is strange because it worked before. What could change and where is the problem?

Solved

3 Replies

mikimakimikiHOBBY

2 months ago

but command 'railway connect MongoDB' works successfully, but it does not let me to use 'mongorestore'


mikimakimikiHOBBY

2 months ago

and "mongosh" command from settings works well for connection but "mongorestore" command fails by auth reason with same credentials (from setting and from "mongosh" command from settings). Does "mongorestore" blocked or something?

"error connecting to host: could not connect to server: connection() : auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": (AuthenticationFailed) Authentication failed."


mikimakimikiHOBBY

2 months ago

found the solution

had to add GET param to connecting uri - "?authSource=admin"


Status changed to Solved brody 2 months ago


Connecting to mongo by public url - Railway Help Station