Without connecting to MySQL, server is working fine?
Connection data (server, db, user, pass) faithful and really exist?

Stupid idea of course, but try to enter specific IP in the host or fix it to "localhost".
It is also worth looking at the allowed connections for the user ("%", "localhsot" etc): in phpmyadmin for example