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=0.0.0.0
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?