I'm guessing you've seen these/been all over their tech help ?
http://support.hostgator.com/articles/cpanel/how-to-connect-to-the-mysql-database-remotely[
^]
http://support.hostgator.com/articles/cpanel/how-to-connect-to-the-mysql-database-remotely[
^]
To start with, I'd put something like the MySQL Workbench on your local machine to help management of your database and check connectivity - once you get the connectivity correct from there, you can then add it to the connection string of a program, which brings me to this ...
you don't show the connection string you used - but it looks like its trying to find a local DB (named pipes) rather than across the network with tcp/udp .. so, please indicate your connection string (update your answer)
btw, I couldn't find anything on their site about how a connection string to their hosted db's is put together, so I hope you have more information
'g'