title: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)
body: <p>Getting the following error when I try to log into my Symfony application on a new CentOs server:</p>
  
  <blockquote>
    <p>SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (13)</p>
  </blockquote>
  
  <p>Stranger yet, I can run the doctrine:schema:update command which works so I know the credentials are correct in parameters.yml.</p>
  
  <p>This is my current my.cnf:</p>
  
  <pre><code>[mysqld]
  datadir=/var/lib/mysql
  socket=/var/lib/mysql/mysql.sock
  user=mysql
  # Disabling symbolic-links is recommended to prevent assorted security risks
  symbolic-links=0
  
  [mysqld_safe]
  log-error=/var/log/mysqld.log
  pid-file=/var/run/mysqld/mysqld.pid
  
  #bind-address = 127.0.0.1
  </code></pre>
  
  <p>I also tried disabling IP tables and had the same result. </p>
  
  <p>Here is my hosts file:</p>
  
  <pre><code>127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
  ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
  </code></pre>
  
  <p>Any ideas?</p>