What version of EE are you using? Is this a local setup? Double check that you are entering the correct credentials (user, password. db name, site name etc.) and make sure the db exists and the user has the correct permissions and access to the designated db.
Also check out this bug report.
I am also having this issue. I’m running php 7 and trying to install EE 5 on a blank server. I’ve checked my credentials several times and can’t seem to get it to work. I am running a server off of the mediatemple grid servers.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.