DEV Community

Discussion on: How to use MySQL on Docker for Rails local development (switching MySQL versions made easy!)

Collapse
 
fabioperrella profile image
Fabio Perrella

Hi, after doing this, I've got an error Mysql2::Error: Access denied for user 'root'@'172.17.0.1' (using password: YES when trying to run rake db:create.

Does anybody have this problem too?

Collapse
 
risafj profile image
Risa Fujii • Edited

That error message looks familiar... I think the password was wrong in my case.
Does the MYSQL_ROOT_PASSWORD that you set while booting up the Docker container match the password in your database.yml?

Also, there may be something in this thread to help you: github.com/docker-library/mysql/is...

Collapse
 
fabioperrella profile image
Fabio Perrella

Sorry, it was my fault, the password was wrong!

Thread Thread
 
risafj profile image
Risa Fujii

Glad it worked!