Unable to connect to a custom MySQL deployment (Dockerfile + volume)
I am currently trying to deploy MySQL via a custom Dockerfile (I need to change
innodb_ft_min_token_size
, which is not possible with the default MySQL deployment).
I am using a simple Dockerfile:
Looking at the build + deploy logs, everything seems to work correctly. However, I cannot connect to the database.
I have connected a default Railway domain. When accessing it via a browser, I get the following error: upstream connect error or disconnect/reset before headers. reset reason: protocol error
.
When connecting to <railwayDomain>:80
via MySQL Workbench, I get the following error: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
.
Trying to connect to port 3306 results in a timeout.
Am I missing anything? Thanks. 🙂Solution:Jump to solution
you will not be able to connect to the database externally without some kind of tunnel, railway does not support accessing services over anything but https and 443 externally, you can only connect to it from another service in the same project with the private networking and internal domains
9 Replies
Project ID:
82bf36ca-fd00-4567-9aa9-5f90227d2f00
82bf36ca-fd00-4567-9aa9-5f90227d2f00
Additionally, the Railway env variable
PORT
is set to 3306
Solution
you will not be able to connect to the database externally without some kind of tunnel, railway does not support accessing services over anything but https and 443 externally, you can only connect to it from another service in the same project with the private networking and internal domains
Just curious if you have any plan to support non-http protocol in the future
yes there was an announcement from cooper that says they plan to support TCP/UDP in the future at some point, no ETAs where given
Good to know, thanks.
no problem! and of course the internal network supports non-http protocols
Ok - thank you for the answer
people have been able to run a Minecraft server on railway through an ngrok tunnel, if it works for Minecraft, should work for a database lol