CDbException

CDbConnection hibába ütközött az adatbázis kapcsolat felépítése közben: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

/home/mozogj/web/belleza.hu/framework/db/CDbConnection.php(382)

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

Stack Trace

#7
+
 /home/mozogj/web/belleza.hu/protected/modules/user/models/User.php(11): CActiveRecord::model("User")
06     const STATUS_ACTIVE=1;
07     const STATUS_BANNED=2;
08     
09     public static function model($className=__CLASS__)
10     {
11         return parent::model($className);
12     }
13 
14     public function tableName()
15     {
16         return Yii::app()->getModule('user')->tableUsers;
#8
+
 /home/mozogj/web/belleza.hu/protected/modules/user/controllers/UserController.php(33): User::model()
28 
29     public function actionView($title)
30     {
31         $this->layout = Yii::app()->controller->module->Userlayout;
32         
33         $model = User::model()->findByAttributes(array('username'=>$title));
34         $profile=$model->profile;
35         
36             if($model != NULL){
37             
38             $posts = new CActiveDataProvider('Post', array(
#23
+
 /home/mozogj/web/belleza.hu/index.php(14): CApplication->run()
09 // specify how many levels of call stack should be shown in each log message
10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
11 
12 require_once($yii);
13 
14 Yii::createWebApplication($config)->run();
15 
16 ?>
2024-03-28 09:27:20 mz/x Yii Framework/1.1.10