title: codeigniter - You have not selected a database type to connect to
body: <p>I am working on codeigniter. While connecting the database I got following error:</p>
  
  <pre><code>    $db['default']['hostname'] = 'localhost';
  $db['default']['username'] = 'root';
  $db['default']['password'] = 'mypass';
  $db['default']['database'] = 'mydatabase';
  $db['default']['mysqli'] = 'mysql';
  $db['default']['dbprefix'] = '';
  $db['default']['pconnect'] = TRUE;
  $db['default']['db_debug'] = TRUE;
  $db['default']['cache_on'] = FALSE;
  $db['default']['cachedir'] = '';
  $db['default']['char_set'] = 'utf8';
  $db['default']['dbcollat'] = 'utf8_general_ci';
  $db['default']['swap_pre'] = '';
  $db['default']['autoinit'] = TRUE;
  $db['default']['stricton'] = FALSE;
  </code></pre>
  
  <p>Error:<code>You have not selected a database type to connect to.</code></p>
  
  <p>I gone through SO and also google, but not getting proper solution. Codeigniter version is 2.1.2</p>
  
  <p>I have selected the database as shown above</p>