Upgrade from 16 to 18 broke system

I ran the install /upgrade stage by stage, and ended up with a white screen.
Now all I get is database access errors.
Message: host=localhost, port=3306, user=dolibarrdebian, databasename=dolibarrdebian, Failed to connect

Unable to reinstall 16 on spare system as php 7 no longer available.
Unable to import database as instructions say to use same version as old system (bad)

Any suggestions please

have you tried connecting to the database outside Dolibarr using exactly the same methods?

Yes using MySQL Workbench. BUT with different user name, which has limited rights

try with the same user