title: Access local MySQL server within my network
body: <p>I have a website that has a page that needs to show all the information that is in the local MySQL server (not in the hosting). How am I gonna do that? </p>
  
  <p>I only tried to change the connection details but no luck on that matter.</p>
  
  <p>db_connect.php (connect to hosting server)</p>
  
  <pre><code>&lt;?php 
     $servername = "localhost";
     $username = "xxx";
     $password = "yyy";
     $database = "dbdb";
  
     $conn = new mysqli($servername, $username, $password, $database);
  
     if($conn-&gt;connect_error){
          die("FAILED TO CONNECT : " . $conn-&gt;connect_error);
     }
  ?&gt;
  </code></pre>
  
  <p>to db_local.php (connect to my local server)</p>
  
  <pre><code>&lt;?php 
     $servername = "192.168.x.xx";
     $username = "";
     $password = "";
     $database = "info";
  
     $conn = new mysqli($servername, $username, $password, $database);
  
     if($conn-&gt;connect_error){
         die("FAILED TO CONNECT : " . $conn-&gt;connect_error);
     }
  ?&gt;
  </code></pre>
  
  <p>Is it possible? I only need to do that as a first aid solution in my main problem. I am getting this kind of error: </p>
  
  <blockquote>
    <p>FAILED TO CONNECT : Can't connect to MySQL server on '192.168.x.xx' (110)</p>
  </blockquote>