I am trying to run a MariaDB database over docker. I've started the container with the following command:
docker run -p 3306:3306 --detach --name mymariadb --env MARIADB_USER=admin --env MARIADB_PASSWORD=admin --env MARIADB_ROOT_PASSWORD=root mariadb:latest
I know have a C#-Skript that should connect to MariaDB and create a database. I know the skript works, because it has worked for other people in my class and for me as well in the past for other databases. I have the following connection string:
Server=localhost;User ID=admin;Password=admin;
When I run the skript I get an error 1045:Access denied for user 'admin'@'localhost'.
Does anyone know what could be the problem or even how I could troubleshoot?
I've tried restarting the container and replacing the user name and password, but it didn't work. Then I've tried using Postgres instead (with a different connection string), but it denied access as well, so maybe it has something to do with my firewall?