title: Yii connection to live database
body: <p>I am developing an application localy, and want to connect to live database, but when trying to get to gii's crud generator I am given the following error:</p>
  
  <p>CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.</p>
  
  <pre><code>if(Yii::app()-&gt;db===null)
  </code></pre>
  
  <p>There is no problem to connect to a local database, so I guess it has something to do with XAMPP or firewall settings but I cannot figure out what.</p>
  
  <p>Many thanks in advance.</p>