Ok, finally found a solution:
1. create a mysql directory in /usr/local: sudo mkdir /usr/local/mysql
2. In that directory create two symlinks:
sudo ln -s /Applications/MAMP/Library/lib/mysql lib
sudo ln -s /Applications/MAMP/Library/include include
3. MySQL socket must be found by perl, but it looks for it in /tmp
So create a symlink to it:
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock
Also may need to create a further symlink:
ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql
because the mysql.bundle references /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib which is wrong.
(Note: first three steps courtesy of a post on MAMP forum:
http://forum.mamp.info/viewtopic.php?t=1204&highlight=dbd.
Last step courtesy of a post on thescripts:
http://www.thescripts.com/forum/thread676055.html)
That worked for me.