title: Unable to connect to MySQL DB on Production
body: <p>I'm thinking that I've done up the <code>database.yml</code> file improperly. The file is as follows:</p>
  
  <pre><code>default: &amp;default
    adapter: mysql2
    encoding: utf8
    pool: 5
    username: root
    password:
    host: localhost
  
  development:
    &lt;&lt;: *default
    database: blog_development
  
  test:
    &lt;&lt;: *default
    database: blog_test
  
  production:
    &lt;&lt;: *default
    database: ENV['CLEARDB_DATABASE_URL']
    username: ENV['CLEARDB_DATABASE_USERNAME']
    password: ENV['CLEARDB_DATABASE_PASSWORDs']
  </code></pre>
  
  <p>When I run <code>heroku run rake db:migrate</code> I get:</p>
  
  <pre><code>Running `rake db:migrate` attached to terminal... up, run.8056
  rake aborted!
  Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  </code></pre>
  
  <p>I have ClearDB installed with mysql2.</p>