title: Use of MySQL persistent connection in ZF2
body: <p>On ZF2 I need to use a persistent MySQL connection and reconnect and the MySQL is gone away.
  But I can not figure out where I should activate the MYSQL_OPT_RECONNECT parameter.</p>
  
  <p>My db adapters are definied as follow:</p>
  
  <pre><code>    'db' =&gt; array(
          'driver'         =&gt; 'Pdo',
          'dsn'            =&gt; 'mysql:dbname=DB_NAME;host=HOST',
          'driver_options' =&gt; array(
              PDO::MYSQL_ATTR_INIT_COMMAND        =&gt; 'SET NAMES \'UTF8\'',
          ),
          'username' =&gt; 'LOGIN',
          'password' =&gt; 'PWD',
      ),
  </code></pre>
  
  <p>I have tried things like :</p>
  
  <pre><code>'db' =&gt; array(
      'driver'         =&gt; 'Pdo',
      'dsn'            =&gt; 'mysql:dbname=DB_NAME;host=HOST',
      'driver_options' =&gt; array(
          PDO::MYSQL_ATTR_INIT_COMMAND        =&gt; 'SET NAMES \'UTF8\'',
          'AUTO_RECONNECT_ON_UNSERIALIZE'  =&gt; 1,
      ),
      'options'       =&gt; array(
          'AUTO_RECONNECT_ON_UNSERIALIZE'  =&gt; 1,
      ),
      'username' =&gt; 'LOGIN',
      'password' =&gt; 'PWD',
  ),
  </code></pre>
  
  <p>and nothing works.</p>
  
  <p>How to make this mysql_options(&amp;mysql, MYSQL_OPT_RECONNECT, &amp;reconnect);
  happen somewhere ?</p>