I created a new Rails project, I used scaffold and then tried to rake db:create.
I didn't changed config/database.yml so password was null (I always enter the password I use to log in to localhost/phpmyadmin but this time I forgot it)

in my case what happened is: there were two passwords - one for dev db and one for test db, i forgot to change the password for test db, ran rake, and it changed the password for my user to test password in the yml file.
– rohanagarwalSep 29 '17 at 7:32