title: Codeigniter: Unable to connect to your database server using the provided settings
body: <p>I use codeigniter as cms framework, if database hostname is localhost, it works correctly.</p>
  
  <pre><code>$db['default']['hostname'] = 'localhost';
  $db['default']['username'] = 'root';
  $db['default']['password'] = 'test';
  $db['default']['database'] = 'jinma';
  $db['default']['dbdriver'] = 'mysql';
  $db['default']['dbprefix'] = '';
  $db['default']['pconnect'] = TRUE;
  </code></pre>
  
  <p>Using above configuration works correctly, but if hostname is changed to:</p>
  
  <pre><code>$db['default']['hostname'] = '192.168.1.222';
  </code></pre>
  
  <p>A Database Error Occurred:</p>
  
  <pre><code>Unable to connect to your database server using the provided settings.
  Filename: third_party/fuel/Loader.php
  Line Number: 134
  </code></pre>
  
  <p>and i can ssh 192.168.1.222,
  Meanwhile in 192.168.1.222, it's also ok when hostname is localhost.</p>
  
  <p>I searched in google and got a solution to add:</p>
  
  <pre><code>$db['default']['port'] = '3306';
  </code></pre>
  
  <p>but it doesn't work for me, any idea?</p>
  
  <p>Thank you, this is my first question, sorry to be stupid.</p>