title: Yii CDbConnection failed to open the DB connection: could not find driver with google cloud sql
body: <p>I'm having an issue with Yii and a mysql database running on Google Cloud sql. </p>
  
  <p><strong>Quick overview:</strong></p>
  
  <p>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.</p>
  
  <p><strong>What I have tried</strong></p>
  
  <p>I have written a simple php script which uses 
  <code>PDO('mysql:&lt;IPADDRESS&gt;;dbname=&lt;MYDBNAME&gt;,'MYUSERNAME','MYPASSWORD');</code> and this connects absolutely fine and can read tables and return data.</p>
  
  <p><strong>The Issue</strong></p>
  
  <p>As soon as I do the same in yii in the config/main.php it does not seem to work and get the error: <strong>CDbConnection failed to open the DB connection: could not find driver</strong></p>
  
  <p>Here is the yii connection string</p>
  
  <pre><code>'db'=&gt;array(
                      'connectionString' =&gt;'mysql:host=my.server.ip.address;dbname=my_db_name',
                      'emulatePrepare' =&gt; true,
                      'username' =&gt; 'my_username',
                      'password' =&gt; 'my_passsword',
                      'charset' =&gt; 'utf8',
              ),
  </code></pre>
  
  <p>I've also run the yii requirements script and it all returns as passed for the mysql PDO functions.</p>
  
  <p><img src="https://i.stack.imgur.com/ui4GX.png" alt="enter image description here"></p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thanks,</p>