mysqli_connect отлично работает для меня, чтобы подключить приложение PHP, работающее на Google Cloud App Engine, к облачному SQL ...
// DMBS here means database management system, like Cloud SQL
define('HOSTSPEC', NULL);
define('USERNAME', '[MY_DBMS_USERNAME]');
define('PASSWORD', '[MY_DBMS_PASSWORD]');
define('DATABASE_INSTANCE_NAME', NULL); // Or the name of a database instance within your Cloud SQL instance.
define('PORT', NULL);
define('SOCKET', '/cloudsql/[GOOGLE_CLOUD_PROJECT_NAME]:[GOOGLE_CLOUD_REGION]:[CLOUD_SQL_DBMS_INSTANCE_NAME]');
// Option 1. Object-oriented style...
$mysqli = new mysqli(HOSTSPEC, USERNAME, PASSWORD, DATABASE_INSTANCE_NAME, PORT, SOCKET);
// Option 2. Procedural style...
$DBMSresource = mysqli_connect(HOSTSPEC, USERNAME, PASSWORD, DATABASE_INSTANCE_NAME, PORT, SOCKET);
if (!$DBMSresource)
// log and handle error, maybe exit...