title: MySQL (ClearDB) does not work on Heroku
body: <p>I have multiple (FREE) apps on Heroku, all of them using PHP and MySQL. However, on one of them I constantly have issues with ClearDB (MySQL). I get the following error</p>
  
  <blockquote>
    <p>SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)</p>
  </blockquote>
  
  <p>When I try to connect to it from my local machine, it works fine. I have tried removing the ClearDB addon and adding it again multiple time, but this hasn't solved the issue. This has been going on for about 3 weeks now.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>    public $production = array(
      'datasource' =&gt; 'Database/Mysql',
      'persistent' =&gt; false,
      'host' =&gt; 'us-cdbr-east-04.cleardb.com',
      'login' =&gt; 'username',
      'password' =&gt; 'password',
      'database' =&gt; 'heroku_9565d18e1870f97',
      'prefix' =&gt; '',
      //'encoding' =&gt; 'utf8',
  );
  </code></pre>
  
  <p>and here is the URL I get from Heroku/ClearDB</p>
  
  <pre><code>mysql://username:password@us-cdbr-east-04.cleardb.com/heroku_9565d18e1870f97?reconnect=true
  </code></pre>
  
  <p>Any ideas what to do now? Does my code look right? I can probably ask Heorku's support, but I would rather ask the community first, since I am not paying for Heroku at the moment. </p>