R
Railway

✋|help

I can't seem to be able to use the mariadb app i'm running in my PHP project

Nnepsenpai8/23/2023
I want to be able to connect my mariadb app deployed on railway in my PHP script but when I try to use the domain i generated on railway to test it i always get an getaddrinfo failed: Host unknown error, i have been trying different things but nothing seem to work
Solution:
but yeah as it stands, you will only be able to connect to the database while on railway and only from the internal domain
Jump to solution
Nnepsenpai8/23/2023
c85ae7e7-7613-4046-984a-d794087b9f9e
Bbrody1928/23/2023
show us a screenshot of your service variables please
Nnepsenpai8/23/2023
The thing is I figured it out more or less, in the mariadb template I didn't have a variable for the host of the container, so I added to the project the github repo with my code and tried it with the private connection from railway, that worked but I want to know if there is a way to access it from outside the railway project it doesn't add to the usage
Bbrody1928/23/2023
you can't access a database over the private network, please show me us a screenshot of your service variables, keep the values hidden
Nnepsenpai8/23/2023
Bbrody1928/23/2023
where is the database hosted
Nnepsenpai8/23/2023
In that project, in railway
Bbrody1928/23/2023
railway doesnt provide a mariadb? did you deploy your own?
Nnepsenpai8/23/2023
I used a template, it seems to use some dockerfiles
Bbrody1928/23/2023
can you connect to it with the internal domain?
Nnepsenpai8/23/2023
I couldn't find that, only thing i found was the exposed port
Bbrody1928/23/2023
the internal domain is visable in the service settings of the database service
you will not be able to connect to the database from the public railway domain, you can go ahead and remove the public domain from the service
Nnepsenpai8/23/2023
Could you show me where the internal domain should be? I can't find it in the database settings
Bbrody1928/23/2023
Bbrody1928/23/2023
again, in the service settings
Nnepsenpai8/23/2023
Oh you mean that
Thats worked when I uploaded my code into the railway project
But i couldn't access the database from outside
Bbrody1928/23/2023
okay so you can connect to the database with that domain when deployed to railway
Nnepsenpai8/23/2023
Thats correct
Bbrody1928/23/2023
this is expected, railway doesn't yet support tcp proxying for services
^
Nnepsenpai8/23/2023
Then if I want to connect to this database I need to deploy my code right?
There is no other way right now
Bbrody1928/23/2023
there is, but its out of the scope of these help threads
look into ngrok
Nnepsenpai8/23/2023
Ok, i will check that out, thx for the help
Solution
Bbrody1928/23/2023
but yeah as it stands, you will only be able to connect to the database while on railway and only from the internal domain

Looking for more? Join the community!

Recommended Posts
Railway too slowI have an issue with my railwat app. The app is too slow once update my github project. Making it alTrying to communicate over private network and not workingI have a service that has just private networking enabled and listens on ipv6 (http server). When I How is Redis instance pricing calculatedDoes the per vCPU and per GB memory pricing apply to a Redis database? Would like to know before I svolume permissionsMy docker run script is trying to install as a user owned file into volume mount point but getting pDeployment Issue: ModuleNotFoundError for Flask with Poetry-based ProjectHello, I'm having trouble deploying a Flask app on Railway using Poetry for dependency management. DDoes HTTP response count towards egress quota?I just want to check an external endpoint a few times a day but the response is quite big.Hosting a Directus + NuxtJs project service availableI'm trying to host a Directus service and NuxtJs service but I'm having some trouble getting the froDB StorageHello all, I have a question. How much storage does Railway have when building a server or databaseLogs broken?Hello is there a problem with logs? I am not seeing any build or deploy logs at all, I just see the Minecraft Server isn't working?When I use the minecraft server template and leave everything it will give this error in the logs anFormbricks Template error (upon redeployment w/ SMTP setup)``` error getting environment TypeError: fetch failed at Object.fetch (node:internal/deps/undicPayload CMS + Nextjs Deployment Failed during build processUsing the template courtesy of @Brody with Next.js added [as seen here](https://github.com/payloadcmHosting a modded Minecraft serverHi guys! I'm trying to host a modded minecraft server through Railway using the `Minecraft Server` tCan't connect to RedisThis is the error I am getting. What I have checked so far * Made sure I used the env variables provHello everyone, i'm trying to make a python websocket using websockets library also flaskso basically i have this -> ```py async def main(): url = os.environ.get('RAILWAY_URL', 'localExtension of Payment Due Date for SubscriptionIs there a way I can request for a brief extension of a few days for my upcoming payment?Hello Everyone! I am facing some problem related to deploying my nodejs application.I have deployed my nodejs application using github, but do not know how can I connect phpmyadmin so RedeployHey there, is there away to start a redploy using the Railway APIKafka Connectioncould anyone help me setup kafka cluster? I've went through the deployment process but getting a conHosting a monorepo with a Vite/Svelte Front and and a Fiber BackendI am trying to host my monorepo application within railway however I am facing some issues when tryi