title: Google-App-Engine MySQL datebase not connecting
body: <p>I have a Google App Engine website with PHP and a MySQL instance database attached. I have a database connection file and I can connect the database to the website in the GAE development area but when I deploy the application I am unaware of how to connect them. I have the following code but it doesn't work.</p>
  
  <pre><code>&lt;?php
    $host = "unix_socket=/cloudsql/application:instancename";
    $user = "root";
    $password = "password";
    $database = "database";
  
    $connect = new mysqli($host, $user, $password, $database ); 
  
    if ($connect-&gt;connect_errno) 
    {
      echo "Failed to connect to MySQL: " . $connect-&gt;connect_error; 
    }
  ?&gt;
  </code></pre>
  
  <p>Any ideas?</p>