Unable to access MariaDB #25546
-
Hey there 👋 I have a really strange problem, and I’m stuck now after having tried to solve this for hours. The problem: I have a GitHub Actions-based build, which needs to start a MariaDB and connect to it. I start the MariaDB with the following command:
This works fine. Afterwards I try to connect (after a sleep of 15 seconds to give the container enough time to start):
This works locally on my macOS machine. But it does not work on GitHub Actions, instead I get an error message telling me:
Why is that? What am I missing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Please try to add – protocol=tcp setting to mysql command. Because you are running MySQL inside Docker container, socket is not available and you need to connect through TCP. Setting “–protocol” in the mysql command will change that. And you specify a wrong port 3009 in mysql command, please correct it to 3309. |
Beta Was this translation helpful? Give feedback.
-
Oh… yes, the port is wrong 😳 It’s *these* things that keep you trying for hours, and of course you look everywhere but there 😉 Fixing the port, setting the protocol and increasing the timeout helped. Thanks 👍 |
Beta Was this translation helpful? Give feedback.
Please try to add – protocol=tcp setting to mysql command. Because you are running MySQL inside Docker container, socket is not available and you need to connect through TCP. Setting “–protocol” in the mysql command will change that.
And you specify a wrong port 3009 in mysql command, please correct it to 3309.