I just installed 3.4.2 on my server, and followed the instructions here (http://codex.wordpress.org/Installing_WordPress) to the letter, substituting real servername, databasename, username, and password where appropriate, and I receive the dreaded "Error establishing a database connection" when I try to visit the site or log in to the site.
I created a testconnection.php page in the folder where WP is installed that tests the database connection, and it verifies that my user/pass combo for the user is correct and that it successfully executed the mysql_select_db command with the database involved. It even pulls the wp_users table and spits out a row count (currently 1 user: admin).
I tailed my error log, and found this pair of error messages (server and folder names changed to protect the innocent :D ):
[Thu Nov 15 15:37:22 2012] [error] [client nnn.nnn.nn.nn] PHP Warning: include_once(/var/www/installfoldername/wp-content/sunrise.php): failed to open stream: No such file or directory in /var/www/installfoldername/wp-includes/ms-settings.php on line 18, referer: http://mysubdomain.mydomain.edu/wp-admin/install.php?step=2
[Thu Nov 15 15:37:22 2012] [error] [client nnn.nnn.nn.nn] PHP Warning: include_once(): Failed opening '/var/www/installfoldername/wp-content/sunrise.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/installfoldername/wp-includes/ms-settings.php on line 18, referer: http://mysubdomain.mydomain.edu/wp-admin/install.php?step=2
It seems to want the sunrise.php file, but the install tarball does not provide it.
Kinda got a headache from beating my head against the desk.