I'm having an issue with Yii and a mysql database running on Google Cloud sql.
Quick overview:
We have moved this from an existing server where it all worked with no issues at all and have now set up a Google Compute Engine server with php and all the relivant drivers mysql_pdo being one of them. We also have a Google Cloud SQL database storing all of our existing database information.
What I have tried
I have written a simple php script which uses
PDO('mysql:<IPADDRESS>;dbname=<MYDBNAME>,'MYUSERNAME','MYPASSWORD');
and this connects absolutely fine and can read tables and return data.
The Issue
As soon as I do the same in yii in the config/main.php it does not seem to work and get the error: CDbConnection failed to open the DB connection: could not find driver
Here is the yii connection string
'db'=>array(
'connectionString' =>'mysql:host=my.server.ip.address;dbname=my_db_name',
'emulatePrepare' => true,
'username' => 'my_username',
'password' => 'my_passsword',
'charset' => 'utf8',
),
I've also run the yii requirements script and it all returns as passed for the mysql PDO functions.
Any help would be greatly appreciated.
Thanks,