title: Connecting through MySQL socket with Zend Framework
body: <p>I have recently started using Zend Framework. I started developing on my local XAMPP server which went fine but when I uploaded to my 1and1 account, I keep getting the following error:</p>
  
  <blockquote>
    <p>Message: SQLSTATE[HY000] [2002] Can't
    connect to local MySQL server through
    socket '/var/run/mysqld/mysqld.sock'
    (2)</p>
  </blockquote>
  
  <p>I have tried changing the resources.db.params.unix_socket line in my application.ini file to the different ones mentioned in phpinfo but with no success. I found <a href="https://stackoverflow.com/questions/711473/why-cant-i-connect-to-my-sql-database-i-get-the-error-message-cant-connect-t">here</a> that someone answered </p>
  
  <blockquote>
    <p>Is the MySQL server on the same host
    as the web application? If not, you
    can't use a socket connection, and
    will need to connect via TCP.</p>
  </blockquote>
  
  <p>I think that is the case with my web host. How can I change ZF to connect via TCP instead?  I am currently using PDO_MYSQL.</p>