title: Why does yii2 try to connect to mysql when I have not configured it to?
body: <p>This is what I did:</p>
  
  <ul>
  <li>I downloaded the yii2 advanced template.</li>
  <li>Ran php init.</li>
  <li>Configured each of main-local.php files in 
  <ul>
  <li>environments/dev/common/config</li>
  <li>environments/prod/common/config</li>
  <li>common/config</li>
  </ul></li>
  </ul>
  
  <p>I added the following to the 'components'</p>
  
  <pre><code>'db' =&gt; [
      'class' =&gt; 'yii\db\Connection',
      'dsn' =&gt; 'sqlite:/path/to/sqlitedbs/yayr.sq3',
      'username' =&gt; 'root',
      'password' =&gt; '',
      'charset' =&gt; 'utf8',
  ],
  </code></pre>
  
  <p>I configured the apache vhosts as explained in the readme.</p>
  
  <p>Running <code>yii migrate</code> created the sqlite database file in the configured location with no errors.</p>
  
  <p>What breaks is when I go to the frontend app and try to submit the sign up form, it gives me this error:</p>
  
  <pre><code>Exception
  Database Exception – yii\db\Exception
  
  SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
  ↵
  Caused by: PDOException
  
  SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
  
  in /home/johnsmith/dev/test/yayr/vendor/yiisoft/yii2/db/Connection.php at line 579
  </code></pre>
  
  <p>The full stack trace can be seen: <a href="http://pastebin.com/KEKH1zbM" rel="nofollow">http://pastebin.com/KEKH1zbM</a></p>
  
  <p>I have used my IDE to search for every location that a mysql dsn exists. The only place is in <code>/tests/codeception/config/config.php</code> which should not be called by submitting a form. To double check, I commented out the config, and it didn't help.</p>
  
  <p>I also tried setting <code>'driverName' =&gt; 'sqlite',</code> in the config, but that did not make any difference. Neither did commenting out the username, password, or charset parameters.</p>
  
  <p>None of the functions referenced by the stack trace appear to manually call MySQL. They all look for the configured dsn.</p>
  
  <p>So, why does Yii think it can even try to connect to MySQL? Doesn't ActiveRecord abstract out all the SQL so that it won't matter if I'm using MySQL or sqlite?</p>
  
  <p>How do I get past this issue? Using sqlite would make initial development a lot easier.</p>
  
  <p>Thanks!</p>