Mysql, acess denied for user, using password: no

Asked

Viewed 88 times

2

When creating a new project in Rails using mysql

rails new exemplo -d mysql

and then

rake db:create

I have the following error

Acess denied for user 'root@localhost' (using password: NO) Please provide root password for your MySQL instalation

Then it asks for the password of my mysql, I put and continues giving the same error, even getting connect in the database by terminal.

1 answer

0

The problem was solved by placing user and password of the database in the database.yml file, in the config folder of my project test:

sudo gedit /var/www/teste/config/database.yml

Browser other questions tagged

You are not signed in. Login or sign up in order to post.