View Full Version : Newbie needs help with the rake db:migrate command

01-20-2009, 10:55 PM
Hi, I'm running ROR on my Max OSX Darwin with mysql. I've successfully installed the mysql gem abd have created the active record class by extending ActiveRecord::Migration I have defined my database.yml as follows for development (names changed to protect the innocent :o) )

adapter: mysql
database: myData_development
username: userName
passwoed: myPassword
host: localhost

when rake runs it stops with the following

rake aborted!
Access denied for user 'userName'@'localhost' (using password: NO)

2 questions. Why isn't it using the password supplied in the database.yml file? and how can I make it do so?

Thanks for the help.

03-17-2009, 09:48 AM

if your database.yml has the correct structure, then this password is used so dont worry about that. Try the following

mysql -p userName

from your local machine and key in the password you are using in your database.yml as it seems that the error lies with mysql.
If your connection is ineed refused, login as root/administrator and do a

GRANT ALL ON myData_development.* TO 'userName'@'localhost' IDENTIFIED BY 'passWord'

for adding the user to mysql.

ralph l mayo
05-07-2009, 02:10 AM
Did you ever figure this out? It's because you spelled 'password' with an 'e'

(using password: NO) in MySQL parlance means the client did not attempt to give the server a password at all, so it's not (yet) a grant issue.