*$mysql -u root -h 127.0.0.1
ERROR 1698 (28000): Access denied for user 'root'@'localhost'*
*sudo mysql -u root
update user set plugin='' where User='root';
After adjusting root user with following, issue resolved.
Exact same setup was working on other dev instances but after spending a full day i got the solution.
I faced the exact same issue. while setting up the ror app all the rake commands worked fine. mysql was simply accessible from linux console by simply typing "mysql" and it take to mysql console and database.yml was using root user with empty password.
Then application tries to connect to mysql as "mysql -u root -h localhost" and in my case this command was giving following error.