So you don't have the root database password, or just the Lemmy user password?
Might be worth it to make a new database and create a new Lemmy user and migrate data from the backup.
I found this article which might help: https://www.postgresqltutorial.com/postgresql-administration/postgresql-reset-password/
I've only ever used Maria dB so YMMV.