You don't have to manually reenter all data.
Exception Message: Connect to database failed - did you resolve this error?
It looks like you have an incorrect hostname or login/password for the database.
The best approach is to try to create new/clean installation with new database. If everything works correctly then make a backup of the clean database and restore the old one plus "data" directory which contains other data like files.