connect: connection timed out
connection timed out when I try to connect to the mysql database that I setup on railway. I'm using golang.
what could be wrong?
30 Replies
Project ID:
N/A
N/A
what driver are you using
wym by driver
I'm using gorm for mysql
the SQL driver
yeah gorm
that's an orm, not a driver
how do I see the driver then
you would have imported a driver, what driver did you import
my imports
increase the connection timeout
I just increased it to 60secs, let's see
just checked gorm automatically uses the go-sql-driver
60 seconds failed
In gorm docs it says to use
user
instead of username, right? 🤔
In the example it says: user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local
and in yours says username:pass
thats just a placeholder
u gotta put the real credentials
to connect
oh nvm my bad lol. Just thought it could be a typo
can you connect to the database from something like mysql workbench
I've connected to the db from my local xampp server
successfully
both locally and when hosted on railway don't work
not quite what i was asking
can you connect to the railway database from something like mysql workbench
tried. doesn't connect
are you sure you are using the correct credentials?
will check again
and then try to restart the plugin
still not connecting, will delete this one and spin up a new one
fixed finally
lol okay i didnt know just deleteting a database was an option for you, guess you didnt have any data on it
did have data ofc, export > import :__)
railway doesnt have native export and import, so good on you for doing that yourself
yup, hooked it up on the local xampp :PPP
cool, so all good?
yup, thanks for the help
no prob 🙂