I try to connect to a local MySQL database called time_series with metabase but when I connect I get the following error.
Database name: Could not connect to address=(host=127.0.0.1)(port=3306)(type=master) : Socket fail to connect to host:127.0.0.1, port:3306. Connection refused (Connection refused)
How are you connecting Metabase to MySQL? can you provide more info about that? Metabase is perfectly compatible with MySQL 8. E.g. try this docker-compose
I just tried with your docker-compose.yml file (which I had to change the port from 3306:3306 to 3366:3306) but I still have the same error: Connection refused.
127.0.0.1 is the localhost. If the Metabase App and the database are not running in the same host that won't work. Also, MySQL needs to listen to connections if that hasn't already been configured.
The docker-compose I sent is to connect Metabase with MySQL as the application database, not as a normal data warehouse connection. Also, consider than in my docker-compose file the containers create their own network, so you'll need to make the connections on their own network, so if you need to add the app db as a new data connection in Docker then the host is "mysql" (this is the hostname inside the docker network), the port is "3306" and the user is "metabase" and password "mysecretpassword".
Running Metabase as a JAR file and running in Docker has different considerations, you need to know how the networking works on each
Okay, I figured it out and managed to connect to the default metabase by putting "metabase" in the database to reach. Thank you @Luiggi !
I am now looking to upload my csv data that I already had in my MySQL database accessible by MySQL WorkBench outside of the network data created by docker-compose.yml. I guess I need to connect to the MySQL database created by docker compose and upload my csv file to it. Do you know how I can do this?
when you type 127.0.0.1 inside a docker container, you're referring to the docker container itself, you don't have a database running inside that docker container, you have Metabase.
If the database is running on the HOST which is hosting the docker container, then you need to change the networking mode from bridge to host https://docs.docker.com/network/host/.
It would be easier if instead of running a container, you run the JAR