CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

/var/www/framework/db/CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }
392 
393     /**

Stack Trace

#7
+
 /var/www/html/protected/extensions/giix-components/GxActiveRecord.php(26): CActiveRecord::model("MasterTalent")
21      * composite pk table. Usually a character.
22      */
23     public static $pkSeparator = '-';
24 
25     public static function model($className=__CLASS__) {
26         return parent::model($className);
27     }
28 
29     /**
30      * This method should be overridden to declare related pivot models for each MANY_MANY relationship.
31      * The pivot model is used by {@link saveWithRelated}.
#8
+
 /var/www/html/protected/models/_base/BaseMasterTalent.php(42): GxActiveRecord::model("MasterTalent")
37  *
38  */
39 abstract class BaseMasterTalent extends GxActiveRecord {
40 
41     public static function model($className=__CLASS__) {
42         return parent::model($className);
43     }
44 
45     public function tableName() {
46         return 'talentMerge';
47     }
#9
+
 /var/www/html/protected/models/MasterTalent.php(16): BaseMasterTalent::model("MasterTalent")
11     public $search;
12 
13     const RECORDINGS_PER_PAGE = 25;
14 
15     public static function model($className = __CLASS__) {
16         return parent::model($className);
17     }
18 
19     public function behaviors() {
20         return array(
21             'ERememberFiltersBehavior' => array(
2024-03-19 00:30:03 Apache/2.2.15 (CentOS) Yii Framework/1.1.13