perl -MCPAN -e'install DBI::DBD'
perl -MCPAN -e'install DBD::mysql'
####
./configure --prefix=/usr/local/mysql --without-server
####
make
make install
####
By this time, you will have a beautiful set of mysql command line utilities compiled under Cygwin on /usr/local/mysql
cd .cpan/build/DBD-mysql-3.0002/
cp /usr/local/mysql/bin/mysql_config .
perl Makefile.PL --testhost=127.0.0.1
(this will give you a couple of errors regarding missing header files, mysqld_error.h and possibly others. open the offending file, change the #include to #include "file.h". The missing files are still on the My SQL? source code location and should be copied here. )