I can't connect to the mysql database
tannynogales
HOBBYOP

2 years ago

I am trying to deploy a (1) strapi project with (2) mysql. Both services are in roble-strapi project.

After strapi start instruction, i get a connect database error if I use ${{ MySQL.MYSQL_URL }} in DATABASE_HOST, but if I use "roundhouse.proxy.rlwy.net" value works perfectly.

Strapi .env:

DATABASE_PORT=29788

DATABASE_CLIENT = mysql

DATABASE_NAME = railway

DATABASE_USER = some-user

DATABASE_PASSWORD = some-pass

DATABASE_HOST = roundhouse.proxy.rlwy.net

I am worry to get extra egress costs by using roundhouse.proxy.rlwy.net.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

2 Replies

2 years ago

You would get egress costs with the public TCP proxy host, to avoid that, use the private host and port.


tannynogales
HOBBYOP

2 years ago

I needed to configure the port, now it works correctly using the private network.

Attachments


Status changed to Solved brody almost 2 years ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...