I assume you are seeing the 'Error establishing a database connection' error when trying to get to the login? If this is so, first check that the database info is all correct in the config file. If it is then try logging into cPanel (If you can't get into cPanel then go to the
account panel and try changing your password) and navigate to the databases section. Once there, ensure the users and databases are intact, if they are then try removing the user from the database then relink the user to the database again.
The final thing I can think of right this moment is to go to 'Remote MySQL' in cPanel and ensure that the link is there for the main database server (Can't remember precisely what is meant to be since the MySQL move).