Rake Migrate e MySql: access denied?

Hello. I have set a rails app, set the database.yml file, generated a
simple model, created the migration class file for this model and then
i´m trying to run the cmd: rake migrate, but i receive the following
msg:

  1. C:\Documents and Settings\Ken\My Documents\RoR
    Projects\railslist>rake migrate
  2. (in C:/Documents and Settings/Ken/My Documents/RoR
    Projects/railslist)
  3. rake aborted!
  4. #28000Access denied for user ‘root’@‘localhost’ (using password:
    YES)

What´s probably happening is that MySql is denying access to Rails …
but i can´t figure out how to fix it. Any ideas?

What´s probably happening is that MySql is denying access to Rails …
but i can´t figure out how to fix it. Any ideas?

if you’re database.yml has something like:
username: root
password:
i.e. no password

Try connecting to mysql:
mysql -u root

If you can’t connect, you’ll need to set up a user ‘root’ without a
password.
Something like from within mysql:
GRANT ALL PRIVILEGES ON . TO ‘root’@‘localhost’ WITH GRANT OPTION;

MySQL docs:
http://dev.mysql.com/doc/refman/5.0/en/adding-users.html

  1. C:\Documents and Settings\Ken\My Documents\RoR
    Projects\railslist>rake migrate

oops. rake migrate is deprecated, instead use:
rake db:migrate

I am also having the same problem now. if u find a soln. please let me
know.

Mohan

Hi all … I created a new user and set the proper permissions to this
new user and now everything works fine!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs