OK, problem solved, at least in my case.
I had missed the step of granting permissions to my database user. This is fairly easy to miss when using PHP CPANEL because it looks like default permissions have already been granted. But the “Grant Permissions” button must be clicked to actually apply the permissions. It had been a while since I had done this, and therefore missed it.
I hope this might help some others who are having this problem.
I’m a new user, clean install, and have the same problem. Like others, have checked the wp-config file for correct database name, host (localhost), etc.
I deleted line 304 in wp-db.php and now see the “real” error msg, but am no closer to a solution.
Does anyone have a solution other than installing a back-level version and converting?