title: Database Exception – yii\db\Exception
body: <p>I got this error:</p>
  
  <blockquote>
  <pre><code>Caused by: PDOException
  invalid data source name
  in C:\wamp64\www\quickcar\vendor\yiisoft\yii2\db\Connection.php at line 686
  </code></pre>
  </blockquote>
  
  <p>This is the <code>main-local.php</code>:</p>
  
  <pre><code>return [
      'components' =&gt; [
          'db' =&gt; [
              'class' =&gt; 'yii\db\Connection',
              'dsn' =&gt; 'quickcar',
              'username' =&gt; 'quickcar',
              'password' =&gt; 'quickcar',
              'charset' =&gt; 'utf8',
          ],
  
          'mailer' =&gt; [
              'class' =&gt; 'yii\swiftmailer\Mailer',
              'viewPath' =&gt; '@common/mail',
              // send all mails to a file by default. You have to set
              // 'useFileTransport' to false and configure a transport
              // for the mailer to send real emails.
              'useFileTransport' =&gt; true,
          ],
      ],
  ];
  </code></pre>