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

Database access denied #10

Closed
gktrainer opened this issue Dec 20, 2017 · 6 comments
Closed

Database access denied #10

gktrainer opened this issue Dec 20, 2017 · 6 comments

Comments

@gktrainer
Copy link

Hi Alex!

I changed the configurations on env file, but when i execute the command "docker exec", i receive the message "Access denied for user 'magento'@'dockermagento2_web_1.dockermagento2_default' (using password: YES)".

I am a newbie on docker universe, and the solution can be simple, but i can't see this solution.

Best regards!

@alexcheng1982
Copy link
Owner

alexcheng1982 commented Dec 20, 2017 via email

@gktrainer
Copy link
Author

Hi Alex!

With MySQL default settings, it's worked!

Best Regards!

@alexcheng1982
Copy link
Owner

alexcheng1982 commented Dec 26, 2017 via email

@gktrainer
Copy link
Author

It's happens, do not worry. I'll use it for a proof of concept.

@alexcheng1982
Copy link
Owner

The problem is in the MySQL docker container. Its init script doesn't create the db user when the data directory exists. So if you have started the container using the default password, even after you changed the password settings in the env file, MySQL container still use the old password. You need to remove the data volume first using docker volume rm, then start Docker compose again. You can check the output of MySQL container to verify whether it creates new user or not.

@taqvi
Copy link

taqvi commented Apr 9, 2019

Is there a docker command to remove all volumes at once ?

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

3 participants