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