Cant connect to MongoDB
mikurisan
HOBBYOP

10 months ago

I have already configured a TCP port.

But whether from other clients or from Railway's Data UI interface, I cannot connect to MongoDB.

Why so hard ... really really speechless.

Solved$10 Bounty

4 Replies

Railway
BOT

10 months ago


mikurisan
HOBBYOP

10 months ago

ok, i know why.

tcp prot have to set xxx -> :27017.

anyone tell me why?


mikurisan
HOBBYOP

10 months ago

So the left side is the external port, and the right side is the internal port.

I always thought it was the other way around.


10 months ago

If you're reffering to connecting with mongodb isntance with something like "MongoDB Compass".

go into "Variables" section, and copy MONGODB_PUBLIC_URL

using this URL, you can access your mongoDB.

do Note that it contains your password so,

"handle with care"

Attachments


Status changed to Solved mikurisan 10 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...