So if you are running MAMP on your Mac and baking some CakePHP you may encounter errors when trying to run the Cake Console.
The error is likely to look something like
Warning Error: PDO::__construct():  No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/rootpath/lib/Cake/Model/Datasource/Database/Mysql.php, line 160]
Add the following to your database.php config file.
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'