TypeScript backend service can only reach mysql service through external address.

jackdavis01
HOBBY

8 months ago

Dear Railway Support,

TypeScript/Node.js backend service can only reach mysql service through external address. The internal address MYSQLHOST: mysql.railway.internal MYSQLPORT: 3306 doesn't work.
What is the problem? How can I fix that and how can I use the internal address?

Best regards, J. D.

Solved

2 Replies

8 months ago

There is no database in the project you linked, I assume that means you have the database in a different project.

The service and the database must be within the same project so they can communicate privately.

https://docs.railway.app/guides/private-networking#private-network-context


jackdavis01
HOBBY

8 months ago

Thanks for the help. I created the MySQL service within the same project where the backend is. Now the internal address is working.


Status changed to Solved brody 8 months ago


TypeScript backend service can only reach mysql service through external address. - Railway Help Station