Mysql, access denied for user, using password: no

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 it continues giving the same error, even being able to connect to the database through the terminal.

    
asked by anonymous 26.07.2016 / 17:27

1 answer

0

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

sudo gedit /var/www/teste/config/database.yml
    
26.07.2016 / 17:27