title: Database connection "Mysql" is missing and mysql.sock is missing
body: <p>I was trying to generate model code from cake command line tool. But got this issue.</p>
  
  <pre><code>Warning Error: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/Users/test/Google_WWW/project_name/lib/Cake/Model/Datasource/Database/Mysql.php, line 177]
  
  Error: Database connection "Mysql" is missing, or could not be created. (although it's showing that mysql database is connected at localhost in cakephp directory)
  </code></pre>
  
  <p>I'm using MAMP.</p>
  
  <p>I searched a lot and found some solutions. For instance,this 
     <a href="https://stackoverflow.com/questions/3968013/cakephp-no-such-file-or-directory-trying-to-connect-via-unix-var-mysql-mysq?rq=1">CakePHP: No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)</a> </p>
  
  <p>or I can also make a symbolic link of mysql.sock. </p>
  
  <pre><code>/Applications/MAMP/tmp/mysql/mysql.sock (not present in directory)
  </code></pre>
  
  <p>But before i do anything, the problem is mysql.sock file isn't present in this directory. I have tried re-installing the MAMP but still no mysql.sock.</p>
  
  <p>Please help me solve this problem ? Can I create my own mysql.sock file..?</p>
  
  <p>Edit: My db config</p>
  
  <pre><code>public $default = array(
      'datasource' =&gt; 'Database/Mysql',
      'persistent' =&gt; false,
      'host' =&gt; 'localhost',
      'login' =&gt; 'root',
      'password' =&gt; 'root',
      'database' =&gt; 'db_name',
      'prefix' =&gt; ''
  );
  </code></pre>