title: yii2: Trying to generate model but getting database exception
body: <p>I have started working on yii2. I am using mongodb for database. I have generated mongoDbModel using gii interface. Then i moved to model for model generation. When i clicked on model generator it throws me exception </p>
  
  <pre><code>Database Exception – yii\db\Exception
  SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>My config file code (written mii instead of gii)for gii module is </p>
  
  <pre><code>    'modules' =&gt; [
      'mii' =&gt; [
          'class' =&gt; 'yii\gii\Module',
          'generators' =&gt; [
              'mongoDbModel' =&gt; [
                  'class' =&gt; 'yii\mongodb\gii\model\Generator'
              ],
          'model' =&gt; [
                  'class' =&gt; 'yii\gii\generators\model\Generator'
              ]
          ],
      ],
  ],
  </code></pre>
  
  <p>when i tried loading with ?r=mii interface is loaded and all functions are working except model generator. How to fix this???</p>