I'm not sure about a direct connection to a server, and I doubt that most webservers will allow connections from random computers. I would recommend using a php page to interface the two.
In the script that I'm developing I send data from the script in the form of HTTP POST information, which can be read by the PHP file. PHP then can connect to MySQL. For more information on this, I'd recommend you read up on this at
http://volv.net/?p=13