Showing results forย 
Search instead forย 
Did you mean:ย 
Copilot Lvl 3
Message 1 of 3

Unable to access MariaDB

Solved! Go to Solution.

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:


docker run -d -p 3309:3306 -e MYSQL_ROOT_PASSWORD=wolkenkit -e MYSQL_USER=wolkenkit -e MYSQL_PASSWORD=wolkenkit -e MYSQL_DATABASE=wolkenkit --name test-mariadb mariadb:10.4.10 --bind-address=


This works fine. Afterwards I try to connect (after a sleep of 15 seconds to give the container enough time to start):


mysql --port=3009 --user=wolkenkit --password=wolkenkit --database=wolkenkit --verbose --execute="SELECT USER(),CURRENT_USER();"


This works locally on my macOS machine. But it does not work on GitHub Actions, instead I get an error message telling me:


ERROR 1045 (28000): Access denied for user 'wolkenkit'@'localhost' (using password: YES)
##[error]Process completed with exit code 1.

Why is that? What am I missing?

2 Replies
GitHub Partner
Message 2 of 3

Re: Unable to access MariaDB

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.  


Copilot Lvl 3
Message 3 of 3

Re: Unable to access MariaDB

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 ๐Ÿ‘