I'm connecting directly using this:
if ( !mysql_real_connect ( &mysql , "localhost" , "username" etc etc
but I ran it on my development machine and substituted 192.168.0.7 which is the ip address to the server which I recieved a could not connect response. But that same compiled code run on the server gets a connect message.