yes you were. i just get so freaked out with php that i immediately think i cant do it. but i did what you said, find the problem. so i did and it told me where the error was.
it was a text file. somehow.......the username was changed.
Make sure your db login details are correct on your script and you have assigned the correct permissions for the user to the database. This is done within your control panel.
In your control panel there should be a backup option. You can either generate a backup or download the current days backup. There should be an option to download the database backup too.