The first question to answer is whether the host has been set up to allow remote connections; many are not for security and bandwidth reasons.
Hit the Search button in the upper right corner of this page and search for "mysql remote server", there are a number of threads on the topic. Also check out http://www.mysql.com/doc/en/Can_not_connect_to_server.html