title: Is it possible to connect MySQL to XAMPP log in, which can cause My SQL server away?
body: <p>In Unity, I passed my username and password to Login.php and 'My SQL Server away' occurred.
  I set it up as follows.</p>
  
  <p>php.ini</p>
  
  <pre><code>post_max_size = 750M
  upload_max_filezie = 750M
  max_execution_time = 1200
  max_input_time = 5000
  memory_limit = 1000 M
  max_allowed_packet = 200M
  </code></pre>
  
  <p>phpmyadmin/config.inc.php</p>
  
  <p>+add</p>
  
  <pre><code>$cfg ['ExecTimeLimit'] = 6000;
  </code></pre>
  
  <p>+add
      my.ini</p>
  
  <pre><code>innodb_look_wait_timeout=600
  </code></pre>
  
  <p>If I entered localhost: 8080 / escape_room / Login.php in the web address, it takes a long time for the result screen to appear.
  I would like to ask for advice on this matter.</p>
  
  <p>+Login.php</p>
  
  <pre><code>&lt;?php
  $servername = "localhost:8080";
  $username="root";
  $password="";
  $dbName="escape_room";
  $user_username = $_POST['Input_user'];
  $user_password = $_POST['Input_pass'];
  $conn = new mysqli($servername, $username, $password, $dbName);
  if(!$conn){
      die("Cound not Connect: " . mysqli_connect_error());
  }
  
  $sql = "SELECT pass FROM escape_room WHERE user = '".$user_username."' ";
  $result = mysqli_query($conn, $sql);
  
  //Get the result and confirm login 
  $numrows = mysqli_num_rows($result);
  if($numrows == 0)
  {
      die("ID does not exist \n");
  }
  else{
      while($row = mysqli_fetch_assoc($result)){
          if($row['pass'] == $user_password){ 
              echo "login success";
              echo $row['pass'];  
          }else{
              echo "password incorrect";
              echo "password is =". $row['pass'];
          }
  
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>Errors are as follows.</p>
  
  <pre><code>mysqli :: _construct(): MySQLserver has gone away
  mysqli :: _construct(): Error While reading greeting packet PID=7572
  mysqli :: _construct(): (HY000/2006) : MySQL server has gone away
  </code></pre>