Connection refused to database mysql

Hi
I am so new to Metabase...
So, I run the Metabase using the docker-compose which is defined in THIS source.
And I have a problem with connecting to the database in the installation step.
I face this error:

I have created the database which has the my_db name. and I don't know what can I do right now.
I'll be grateful if you guide me.
Thanks in advance.

Hi @rezza
If you are using Docker, then localhost points to the container itself.
https://stackoverflow.com/questions/28056522/access-host-database-from-a-docker-container
If you are not familiar with Docker, then I would recommend using JAR instead:
https://www.metabase.com/learn/getting-started/installing

1 Like

@flamber
Thanks for the reply.
Actually, I must use docker.
So, can't I use a dockerized MySQL?
I read the link you gave but I did not get much...
Can you please guide me more?

@rezza
You need to input Host and Port in Metabase, so it points to your MySQL.
If you are being told to use Docker by someone, then you should ask them for help. Docker is just like running multiple servers virtually, so it can be tricky to understand how everything connects, but that's really not specific to Metabase.