error after restoring website to alternate virtualmin webserver

I get this error from a drupal website when restored via virtual backup can anyone help:

PDOException: SQLSTATE[28000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES) in lock_may_be_available() (line 167 of /home/rcan/public_html/includes/lock.inc).

This sounds like a problem with accessing a database… You might want to make sure that the database host, name, user and password are still the same on the alternate server, or adjust config files of your web software appropriately if they aren’t.

I’d also strongly recommend against using the “root” MySQL user to access a virtual server database! If a hacker gains access to the config file where the password is stored, they’ll have complete access to your MySQL installation as opposed to just the database(s) of that virtual server. It’s even worse if you’re using the same password for the MySQL root and your Linux root. In that case, a compromised web page means your whole server is root compromised and needs to be reinstalled.

You should definitely create a new user in the virtual server for the express purpose of accessing its databases.