(MacOSX10.8, cakephp2.4)
database.php に unix_socket を追加する
<?php class DATABASE_CONFIG { public $default = array( 'datasource' => 'Database/Mysql', 'persistent' => false, 'host' => 'localhost', 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock', 'login' => 'user', 'password' => 'password', 'database' => 'database_name', 'encoding' => 'utf8', '' ); }