Hi, I am receiving mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known I have the following $socket_prod=":/cloudsql/projectid:europe-west1:databaseinstance"; $dbuser_prod="root"; $dbpass_prod="root_pasw"; $dbname_prod="db_name";
$conn = mysqli_connect($socket_prod,$dbuser_prod,$dbpass_prod,$dbname_prod); I have an Google Engine App running a php service trying to connect to a Google SQL instance in the same project. Any help? On Wednesday, June 7, 2017 at 10:05:23 PM UTC+2, SPED MAKER wrote: > > i did have the same problem.. > You no need use a global variable available in app.yaml. > > the sample suggest to use: > > > 'mysql:unix_socket=/cloudsql/testproject-xxxxxx:us-central1:library;dbname=books', > but like you said, this method works to PDO.... > > to connect with mysql_connect you can use: > $server = ":/cloudsql/INSTANCE_CONNECTION_NAME"; > $user = 'root' > $pass = "pass"; > > mysql_connect ($server,$user,$pass); > > not forget to use :/cloudsql/... > > if to function to you, talk here please. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/c1544e09-4d77-41ad-a4d3-1c1aa8b0def4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
