title: Connect to remote MySql server with XAMPP
body: <p>I have an script that i want it to run for more that 5 minutes. But my current hosting service does not allow me to modify the max_time_limit in the php.ini (That is set to 2 minutes)...
  So i thought that i could run the script with XAMPP and send the data to my database but i cant connect to the remote database.</p>
  
  <p>This is the code for the connection:</p>
  
  <pre><code>$servername = "217.70.186.108"; //I've also tried with the name of the webpage (metagame.gg)
  $username = "the_username"; //the username is not root since I've read that root can only connect from localhost. This user has all privileges. This user was created with the permision to be connected from any server (%)
  $password = "the_password";
  $dbname = "the_db";
  
  $conn = new mysqli($servername, $username, $password, $dbname);
  
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  }
  </code></pre>
  
  <p>It displays this error:</p>
  
  <blockquote>
    <p>Connection failed: An error occurred during the attempt to connect because the connected party did not properly responded after a period of time, or failed in the established connection because connected host has failed to respond. </p>
  </blockquote>
  
  <p>Any help would be highly appreciated</p>