If you are getting below error then also you can follow below steps:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Login to WHM.
Here click on “SQL Services”
Now you will find “MySQL Root Password”, click on it and you can change MySQL root password here.