Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error setting up using docker-compose with existing MariaDB #160

Open
d3rm0d3m0n opened this issue Jan 18, 2024 · 1 comment
Open

Error setting up using docker-compose with existing MariaDB #160

d3rm0d3m0n opened this issue Jan 18, 2024 · 1 comment

Comments

@d3rm0d3m0n
Copy link

When running superuser setup I get the following error:
Access denied for user 'root'@'172.18.0.22.

172.18.0.22 is the network address assigned to Sealevel front end, not the MariaDB container, is that the issue?

I have changed DB_HOST= to the container name of the existing MariaDB isntance, it's using the correct password. The logs of the existing db container show the same issue: Access denied for user 'root'@'172.18.0.22' (using password: YES). The credentials all work fine for login on the PHPMyAdmin backend (Server: container_name, user: root, password: DB_ROOT_PASSWD). What am I doing wrong?

@Simon-CR
Copy link

Simon-CR commented Apr 5, 2024

if you look at the MariaDB user within phpmyadmin, can you confirm which host are allowed to connect using that account ?

mariadb

the hostname with % allows any source IP to connect. If it's not like that, you need to change it. From a security perspective, you should put the IP (or docker name if both are in the same docker network). It's fine to put % just to test if that is the issue.

Also, you should not be using the root for this. You should really create a dedicated user for any sort of applications using a database even if it's a dedicated mariadb instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants