DB connection error while installing WHMCS using "Install Scripts"

I am trying to get WHMCS running with Virtualmin but am not able to get past the “install scripts” stage as I keep getting:

“Database connection failed : DBI connect failed : Access denied for user ‘xxxxxxxx’@‘localhost’ (using password: YES) 1376.”

I have tried various permutations of username, password and database but get the same result.

Where can I start looking for the problem?