Just upgrading PHP shouldn't have changed anything about your database login info. Doublecheck that you're using the same information you were before, and then check with 1and1 to see if that changed at the same time as the PHP update (for instance, if they moved you to a new server in the process).
Again, this shouldn't have happened, but it's possible that either you overlooked a bit of info in their message, or that they didn't tell you everything you needed to know to do an upgrade when you called them.
And good luck. This kind of thing really sucks to go through :(