title: How to access a MySQL database webservice over LAN?
body: <p>I have three PCs that I connect over LAN.</p>
  
  <ul>
  <li>The first PC to database;</li>
  <li>The second to web service CodeIgniter RESTful;</li>
  <li>The third to client.</li>
  </ul>
  
  <p>Now how can I connect web service CodeIgniter server to database, I've set the IP on <strong>aplication/config/database.php</strong>,</p>
  
  <pre><code>$db['default']['hostname'] = 'localhost';
  </code></pre>
  
  <p>I've changed <code>localhost</code> with the IP that is used by the first pc:</p>
  
  <pre><code>$db['default']['hostname'] = '192.168.1.10';
  </code></pre>
  
  <p>But, the result : </p>
  
  <blockquote>
    <p>A database error occurred<br>
    Unable to connect to your database server using the provided settings.</p>
  </blockquote>