Quick tip:
# Problem:
MySQL: Unable to connect to database 'xxx' on server 'xxx' on port xx with user 'root' - Access denied for user 'root'@'xxxxx'
Solution:
GRANT ALL PRIVILEGES ON *.* TO root@'xxxxx' IDENTIFIED BY '$PASSWORD' WITH GRANT OPTION; FLUSH PRIVILEGES;
Have a nice week!
Matheus.