Access denied for user 'root'@'localhost' (using password: YES) (Mysql::Error)
You need to grant access to root from localhost. Check this ubuntu help
try using root
like..
mysql -uroot
then you can check different user and host after you logged in by using
select user,host,password from mysql.user;
check you are putting blank space in password.