How to know my database is proper?

Error establishing a database connection

Created a new WP site with local & WP by using local. Seems to work. Call this SITE1

Developer gave me WP files for a nearly completed site with 2 sets of files representing 2 versions. LOCAL works really well installing the sites & finding the files so it seems. However, when I use the prefered set of files I’ll refer to as SITE2 the error “Error establishing a database connection” appears in the browser. Yet the correct file for the database is showing under DATABASE. Under that is listed a username & password which is generated by your program because I have never seen them before.
When I try to view SITE3 it first told me that WordPress was not installed so I deleted both SITE2 & SITE3 to start over. SITE2 still gives database error but SITE3 gives an immediate error that WP was not successfully downloaded.
I’m more concerned right now about SITE2 & if that looks proper I will not bother with SITE3.
So when database is listed on your program face than why it cannot be connected to? Could there be an error in my database to begin with?