WordPress uses wp-config.php and bbPress uses config.php (although I thought there was talk of prepending bb_ to some files, including that one.)
Anyway, having it in a subdirectory as you do is perfect. If you cannot select the database, then something is wrong in your config.php. The connection details should be the exact same ones as in wp-config.php. Are they? The table prefix should be different in bbPress config.php and can be left as bb_. The table prefix in WordPress wp-config.php might be wp_.
Is there more to the error message? There has been some other trouble recently but it gives a different error message.