You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I spent lot of times thinking about some weird networking issues with my containers but I've finally found which was the problem.
Despite the comment in the doc saying that the tcp protocol is the default for the Net field, the default Config struct from NewConfig is not setting it:
I was expecting to have the tcp(my-address)/ also in the first case.
If the fix to add the default tcp value to the default config in the NewConfig is ok I'll be happy to create a PR.
The text was updated successfully, but these errors were encountered:
Issue description
I spent lot of times thinking about some weird networking issues with my containers but I've finally found which was the problem.
Despite the comment in the doc saying that the
tcp
protocol is the default for theNet
field, the default Config struct fromNewConfig
is not setting it:mysql/dsn.go
Lines 85 to 94 in 44553d6
Because of that when trying to set only the
Addr
the DSN will not be respected.Example code
With only Addr set:
output:
With Addr and Net:
output:
Expected behaviour
I was expecting to have the
tcp(my-address)/
also in the first case.If the fix to add the default
tcp
value to the default config in theNewConfig
is ok I'll be happy to create a PR.The text was updated successfully, but these errors were encountered: