OK - "then" - the problem likely is with your understanding of magneto installation and configuration. If you can get into MySQL via phpMyAdmin, then MySQL is correctly configured (and that is why I asked).
Therefore - While its possible a magneto expert will wander by with a solution, your best resource would be a forum or wiki aimed at magneto support. We do all we can to make a large number of apps/servers work on multiple platforms, but we can't know everything.
or you could Google : database connection error. magento as I just did and get hundreds of links!