CDbException

CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user 'mddce'@'localhost' (using password: YES)

D:\wwwroot\mddce\en\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
+
 D:\wwwroot\mddce\en\protected\models\Slider.php(30): CActiveRecord::model("Slider")
25      * @param string $className active record class name.
26      * @return Slider the static model class
27      */
28     public static function model($className=__CLASS__)
29     {
30         return parent::model($className);
31     }
32 
33     /**
34      * @return string the associated database table name
35      */
#8
+
 D:\wwwroot\mddce\en\protected\controllers\SiteController.php(68): Slider::model()
63     /**
64      * 网站首页
65      */
66     public function actionIndex()
67     {
68         $sliderList = Slider::model()->findAll();
69         //company news
70         $e = new Essay();
71         $companyNewsList =$e->findAll('category_id = 10 limit 5');
72         $industryNewsList =$e->findAll('category_id = 11 limit 5');
73         $policyList =$e->findAll('category_id = 12 limit 5');
#21
+
 D:\wwwroot\mddce\en\index.php(13): CApplication->run()
08 defined('YII_DEBUG') or define('YII_DEBUG',true);
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 Yii::createWebApplication($config)->run();
2024-03-19 14:03:07 Microsoft-IIS/7.5 Yii Framework/1.1.10