0
當試圖連接到谷歌的Cloud SQL我獲得以下錯誤:谷歌App Engine的雲SQL連接問題
Connection error
Unable to find the socket transport "unix" - did you forget to enable it when you configured PHP?
我一直在試圖解決現在這個問題多小時,仍然一無所獲。
我的配置是(在ZF2配置local.php)如下:
return array(
'db' => array(
'driver' => 'Mysqli',
'host' => '',
'database' => 'ar_captab',
'username' => 'root',
'password' => '',
'driver_options' => [
'unix_socket' => ':/cloudsql/some-app-v1-test:some-db'
]
),
);
我也Cloud SQL中加入我的谷歌App Engine應用程序的我的應用程序ID來訪問控制列表(授權App Engine應用程式) 。
當我嘗試運行此:
$config = $this->getServiceLocator()->get('config');
$adapter = new \Zend\Db\Adapter\Adapter($config['db']);
$sql = new \Zend\Db\Sql\Sql($adapter);
$select = $sql->select();
$select->from('example');
$select->where('1');
$statement = $sql->prepareStatementForSqlObject($select);
$results = $statement->execute();
我得到的Unix套接字錯誤。我錯過了什麼?
同樣怪異的事情是,當我試圖從我的本地開發環境中訪問谷歌的Cloud SQL與遠程賬號和IP它工作正常。但是,當嘗試從具有相同憑據的Google App Engine訪問它時,出現「未知」錯誤4294967295 – 2015-03-31 08:20:49