title: code igniter error: Unable to connect to your database server using the provided settings. Filename: core/Loader.php Line Number: 346
body: <p>I'm developing a website application using codeigniter at localhost and then i host it in hawkhost.</p>
  
  <p>At localhost it runs well, but at host there's and error :</p>
  
  <blockquote>
    <p>Unable to connect to your database server using the provided settings.
    Filename: core/Loader.php Line Number: 346</p>
  </blockquote>
  
  <p>this is my db configuration</p>
  
  <pre><code>$active_group = 'default';
  $active_record = TRUE;
  
  $db['default']['hostname'] = 'localhost';
  $db['default']['username'] = '****';
  $db['default']['password'] = '****';
  $db['default']['database'] = '****';
  $db['default']['dbdriver'] = 'mysql';
  $db['default']['dbprefix'] = '';
  $db['default']['pconnect'] = FALSE;
  $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>I know many people already asked this problem but it doesn't seems to solve anything on my case.
  changing <code>$db['default']['db_debug'] = TRUE;</code> to false only hide the error but when i tried to get data from query it doesn't return anything.</p>
  
  <p>I also tried to change <code>$db['default']['pconnect'] = FALSE;</code> to true and still doesn't work.</p>
  
  <p>Any help please? </p>