title: symfony2 database host is localhost
body: <p>Here is my parameters.yml </p>
  
  <pre><code>parameters:
      database_driver: pdo_mysql
      database_host: 192.168.1.7
      database_port: null
      database_name: kpb
      database_user: kpb_user
  </code></pre>
  
  <p>here is <code>echo $this-&gt;container-&gt;getParameter('database_host')</code> - from controller </p>
  
  <pre><code>192.168.1.7
  </code></pre>
  
  <p>here is stack trace - </p>
  
  <pre><code>2. at PDO -&gt;__construct ('mysql:host=localhost;dbname=kpb;charset=UTF8;', 'kochampo_user', '
  </code></pre>
  
  <p>here is ... </p>
  
  <pre><code>echo __FILE__;
          var_dump($params);
          die();
  
  
  vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.phparray(8) { ["driver"]=&gt; string(9) "pdo_mysql" ["dbname"]=&gt; string(3) "kpb" ["user"]=&gt; string(8) "kpb_user" ["password"]=&gt; string(12) "****" ["charset"]=&gt; string(4) "UTF8" ["host"]=&gt; string(9) "localhost" ["port"]=&gt; NULL ["driverOptions"]=&gt; array(0) { } } 
  
  
  
  grep -r "localhost" app/config/ 
  
  return null 
  </code></pre>
  
  <p>cache is cleare by <code>cache:clear</code> and i delete cache directory manually (database name change immediately) .</p>
  
  <p>so how to change database host? why always is <code>localhost</code>? </p>