I installed onlyoffice with apt install onlyoffice-documentserver but now it shows mysql error

I am on ubuntu with apache2 installed on port 80 and i used this guide to install onlyoffice along with my nextloud on the same server, it suggested me to install ngnix on port 81 which worked, then it installed onlyoffice with apt install onlyoffice-documentserver

when i first installed it, it asked me for database password which i mistakenly entered incorrect and from then it gives me error ERROR: can't connect to mysql database

i tried to remove everything and again install it but this time it wont ask me for database password rather just shows the same error again and again,

I want to fix this

Hello @digvijay,
This is the official installation guide, please stick to it: Installing ONLYOFFICE Docs for Debian, Ubuntu, and derivatives
Remember to install all dependencies prior to Docs installation. By default postgresql database should be used, not mysql
Also, it is strongly not recommended to install Onlyoffice Docs and Nextcloud on the same machine
This is the guide for proper deinstallation of Docs: Removing ONLYOFFICE Docs for Linux from your computer