This forum is no longer active. Please post your questions to our new community site

Raked over

Subscribe to Raked over 2 post(s), 2 voice(s)

Avatar OJ_Blorg 1 post

Trying to follow a rails tutorial and I’ve come to the part where I need to use rails migrations in order to add a table to the database.

I run

rake db:migrate

and get

Access denied for user ’’@’localhost’ to database ‘database_i’ve_already_set_up’

FWIW, I’m using RubyStack 1.2-1 on Windows XP

Any idears?

Avatar Beltrán Rueda Administrator 3,714 post(s)


It seems that the “user” does not have permissions to access to the database “database_i’ve_already_set_up”. Try the following:

1. Go to the “Use ruby” console

> mysql -u root -p (and type your password)
mysql> grant all privileges on database_i’ve_already_set_up.* to ‘user’@’localhost’ identified by ‘user_password’;
mysql> flush privileges;