Is it possible to connect to TCP proxy through private networking?
Hello!
Today i deployed a DB (Mysql5.7) on a service and enabled the TCP proxy. I successfully connected to it from my web service.
Is it possible to connect to the service through the private networking?
Thanks!
21 Replies
Project ID:
5a24ad58-38fd-44b0-ac79-47f2f1093c71
5a24ad58-38fd-44b0-ac79-47f2f1093c71
yes it is, as long as you are using the new mysql template
it comes with a
MYSQL_PRIVATE_URL
for you to referance in your own servicei'm using a docker image because i need mysql 5.7 (old version)
i wouldnt mind copy-pasting the address instead of referencing a variable
ideally you would never have to copy / paste within railway
but i tried and couldnt get it to work
you should just be able to set these in the raw editor for your database deployment
and then do the reference in your service
i'm not using the template
i know, thats why you need to add that stuff yourself
ok
does RAILWAY_PRIVATE_DOMAIN contain the private domain on each service then?
initialized by railway
i'll try this. thank you very much
yes it does
related question. if i only connect through private networking. can i disable the tcp proxy?
yes you can
there is no proxy stuff going on with the private network
Thanks again
where you able to connect to the database via the private network?
Cant test it right now. Will do later
ah okay, please update later then!
after setting up this variables.
connecting through MYSQL_URL worked fine but not MYSQL_PRIVATE_URL
ah gotcha, that makes sense, mysql 6.0+ is probably also setup to listen on ipv6 addresses by default, where as the older mysql version isn't, if that matters to you id be happy to do some tests to see if I could get 5.7 communicating on the private network
ooh, OK!
i'm planning to migrate to a newer mysql eventually
knowing that private connection IS possible is ok for the moment
okay I'll get back to you on this in a bit
solved in https://discord.com/channels/713503345364697088/1156976345423814826