#Problem with mysql and Go
15 messages · Page 1 of 1 (latest)
when you say " the connection to the database work" what exactly do you mean?
i'm guessing you were running your app locally on your computer where you have a MySQL DB server running on port 3306, but when you try to deploy the app to another machine (i guess this is the Dokploy instance), there's no DB running on that machine, so you get connection refused
I'm sorry I don't know what Dokploy is, but basically you'll need to install and run a server somewhere, either on that Dokploy instance or some hosted services somewhere, then you'll need to update your DB connection string/config to connect to that database server, wherever it is
the database manager connect to the mysql database, dockploy is a service to deploy services on your server, just a interface for docker swarm, but basically, there is nowhere where this error should come from, absolutly not any reference to localhost or loopback, just an error coming from nowhere, because, it connect to the database, chatgpt, claude, no one seems to know from where this error come from
i have to go soon, but the error is coming from somwhere are you able to capture a screenshot from wherever you see the error? that would give a lot of context that I think may be missing
if possible, grab the entire screen or as much as you can. many times screenshots are cropped too much and missing the key context. saving that, I'll ask more questions, if even to help you get to the right question - is the error from your own server logs?
i see you have lots of good context in your error logs in your repo
its from here
If you're using compose and the database is on a different container, you need to use the service name as the host
So if you have a compose service called db, you'd refer to it as db:3306
From your application
Hmm that screenshot is showing the http response body. Check out your handler for that endpoint, /create, and see how your response is built
Did you delete the repo?
How is this related to Go?
The project you link to is all Python.