http://www.fischerlaender.net/web-20/mac-os-x-trouble-with-mamp-mysql

Running ps -awwx | grep mysql showed, that mysqld had been started by MAMP with the option –socket=/Applications/MAMP/tmp/mysql/mysql.sock, whereas the mysql tool and WordPress assume the socket file here: /tmp/mysql.sock.

With this information the solution is easy:
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /tmp/mysql.sock