title: Exception 'could not find driver' while migration in yii2
body: <p>This my stack trace:</p>
  
  <pre><code>  Exception 'yii\db\Exception' with message 'could not find driver'
  
  in /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Connection.php:534
  
  #0 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Connection.php(836): yii\db\Connection-&gt;open()
          #1 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Connection.php(823): yii\db\Connection-&gt;getMasterPdo()
          #2 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Command.php(208): yii\db\Connection-&gt;getSlavePdo()
          #3 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Command.php(816): yii\db\Command-&gt;prepare(true)
          #4 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Command.php(350): yii\db\Command-&gt;queryInternal('fetchAll', NULL)
          #5 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/mysql/Schema.php(198): yii\db\Command-&gt;queryAll()
          #6 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/mysql/Schema.php(97): yii\db\mysql\Schema-&gt;findColumns(Object(yii\db\TableSchema))
          #7 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/db/Schema.php(140): yii\db\mysql\Schema-&gt;loadTableSchema('migration')
          #8 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/console/controllers/MigrateController.php(121): yii\db\Schema-&gt;getTableSchema('{{%migration}}', true)
          #9 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(610): yii\console\controllers\MigrateController-&gt;getMigrationHistory(NULL)
          #10 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(102): yii\console\controllers\BaseMigrateController-&gt;getNewMigrations()
          #11 [internal function]: yii\console\controllers\BaseMigrateController-&gt;actionUp(0)
          #12 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
          #13 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction-&gt;runWithParams(Array)
          #14 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller-&gt;runAction('', Array)
          #15 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller-&gt;runAction('', Array)
          #16 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/console/Application.php(161): yii\base\Module-&gt;runAction('migrate', Array)
          #17 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/console/Application.php(137): yii\console\Application-&gt;runAction('migrate', Array)
          #18 /opt/lampp/htdocs/advanced/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application-&gt;handleRequest(Object(yii\console\Request))
          #19 /opt/lampp/htdocs/advanced/yii(31): yii\base\Application-&gt;run()
          #20 {main}
  </code></pre>
  
  <p>I am new to yii2. I have added database name,username in <code>advaced/common/config/main-local.php</code>. Using xampp webserver and version of php is 5.6.8 and PDO is also enabled. </p>
  
  <p>This is my db configuration.</p>
  
  <pre><code>'db' =&gt; [
          'class' =&gt; 'yii\db\Connection',
          'dsn' =&gt; 'mysql:host=localhost;dbname=yii2advanced',
          'username' =&gt; 'root',
          'password' =&gt; '',
          'charset' =&gt; 'utf8',
      ],
  </code></pre>