title: Cakephp console (bake) on Mac OS with Mamp : database connection error
body: <p>I am trying to do the <a href="http://book.cakephp.org/complete/641/Simple-Acl-controlled-Application" rel="nofollow noreferrer">Simple Acl controlled Application</a> tutorial in the cakephp cookbook.
  The idea is :</p>
  
  <p>Making Databases </p>
  
  <pre><code> CREATE TABLE users (
   id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL UNIQUE,
   password CHAR(40) NOT NULL,
   group_id INT(11) NOT NULL,
   created DATETIME,
   modified DATETIME
   );
  
  
   CREATE TABLE groups (
   id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
   name VARCHAR(100) NOT NULL,
   created DATETIME,
   modified DATETIME
   );
  
  
   CREATE TABLE posts (
   id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
   user_id INT(11) NOT NULL,
   title VARCHAR(255) NOT NULL,
   body TEXT,
   created DATETIME,
   modified DATETIME
   );
  
   CREATE TABLE widgets (
   id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
   name VARCHAR(100) NOT NULL,
   part_no VARCHAR(12),
   quantity INT(11)
   );
  </code></pre>
  
  <p>Then run the cake bake all command, this is when i have the problem :</p>
  
  <pre><code>Welcome to CakePHP v1.2.4.8284 Console
  ---------------------------------------------------------------
  App : app
  Path: /Applications/MAMP/htdocs/luis/app
  ---------------------------------------------------------------
  ---------------------------------------------------------------
  Bake All
  ---------------------------------------------------------------
  
  Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 374
  
  Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 379
  
  Warning: mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 387
  
  Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /Applications/MAMP/htdocs/luis/cake/libs/model/datasources/dbo/dbo_mysql.php on line 411
  Error: Your database does not have any tables.
  </code></pre>
  
  <p>My database config is like this :</p>
  
  <pre><code>var $default = array(
      'driver' =&gt; 'mysql',
      'persistent' =&gt; false,
      'host' =&gt; 'localhost',
      'port' =&gt; 8889,
      'login' =&gt; 'root',
      'password' =&gt; 'root',
      'database' =&gt; 'cake',
  );
  </code></pre>
  
  <p>So i am using the last CakePHP Version (1.2.5), the last Mamp version (1.7.2) running PHP v5...
  Somebody knows what is the problem ?</p>