title: CakePHP: Can't access MySQL database
body: <p>I'm new to CakePHP and am just running through the configuration process, but am stumped why Cake can't access my MySQL database. The Cake info page says my tmp directory is writable, the FileEngine is being used for caching (don't know what this means), and my database configuration file is present, but that CakePHP cannot connect to the database.</p>
  
  <p>Here are my setup details:</p>
  
  <ul>
  <li>PHP 5.3 (pre-installed on Snow Leopard)</li>
  <li>MySQL 5.1.40 64-bit</li>
  <li>CakePHP 1.2.4.8284</li>
  </ul>
  
  <p>Here are the steps I went through:</p>
  
  <ul>
  <li>Created a MySQL schema called cake_blog</li>
  <li>Created a MySQL user called cake_blog_user</li>
  <li>Granted cake_blog_user the appropriate permissions on cake_blog@localhost and cake_blog@%</li>
  <li>Copied the database.php.default file to database.php and edited the database connection details as appropriate</li>
  </ul>
  
  <p>Here is the relevant configuration data from database.php:</p>
  
  <pre>
      var $default = array(
          'driver' => 'mysql',
          'persistent' => false,
          'host' => 'localhost',
          'login' => 'cake_blog_user',
          'password' => 'cake_blog_password',
          'database' => 'cake_blog',
          'prefix' => '',
      );
  </pre>
  
  <p>Am I missing something here? I should also mention that if I insert an <code>echo mysql_error();</code> into the /cake/libs/view/pages/home.ctp file right before it tests the database connection, the error displayed is "No such file or directory." I have no idea what file or directory it's talking about.</p>
  
  <p>Thanks!</p>