Connecting to mongo by public url

mikimakimiki
HOBBY

5 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

mikimakimiki
HOBBY

5 months ago

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


mikimakimiki
HOBBY

5 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."


mikimakimiki
HOBBY

5 months ago

found the solution

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


Status changed to Solved brody 5 months ago