title: Deployment error - SQLSTATE[HY000] [2002] Connection refused
body: <p>I am working on a symfony application and have recently tried to deploy my work to the server due to having a working login, registration etc.</p>
  
  <p>All is working well locally! note though i am using the RDS database on my localhost. i am not using a dev database.</p>
  
  <p>Originally it was complaining about my PHP version on the server so i updated it to 5.6 and redepolyed, and now i'm getting the following in my logs!</p>
  
  <pre><code>Creating the "app/config/parameters.yml" file
  &gt; Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
  &gt; Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
  
  
  [Doctrine\DBAL\Exception\ConnectionException]                              
  An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused  
  
  
  
  [Doctrine\DBAL\Driver\PDOException]        
  SQLSTATE[HY000] [2002] Connection refused  
  
  
  
  [PDOException]                             
  SQLSTATE[HY000] [2002] Connection refused  
  
  
  Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception
  
  
  [RuntimeException]                                                             
  An error occurred when executing the "'cache:clear --no-warmup'" command:      
  
    [Doctrine\DBAL\Exception\ConnectionException]                                
    An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused    
  
  
    [Doctrine\DBAL\Driver\PDOException]                                          
    SQLSTATE[HY000] [2002] Connection refused                                    
  
  
    [PDOException]                                                               
    SQLSTATE[HY000] [2002] Connection refused                                    
  
  .                                                                              
  
  
  install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [&lt;packages&gt;]...
  (Executor::NonZeroExitStatus)
  
  
  [2016-01-12T16:22:49.583Z] ERROR [2219]  : Command CMD-AppDeploy failed!
  </code></pre>
  
  <p>Any more info need just ask an ill update! any help would be greatly appreciated!</p>