Cant connect to MongoDB
mikurisan
HOBBYOP

5 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


mikurisan
HOBBYOP

5 months ago

ok, i know why.

tcp prot have to set xxx -> :27017.

anyone tell me why?


mikurisan
HOBBYOP

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


jellydeck
FREE

5 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 6 months ago


Loading...