Thanks for your reply, but no... The setup is like this:
Windows runs MySQL
Cygwin runs perl and apache
I can't leave the IP address of the MySQL server unspecified or set to localhost, because then DBD::mysql will try to connect to it through /tmp/mysql.sock, which doesn't exist (remember, it's a windows version of MySQL, so no UNIX sockets...).