CDbException

CDbConnection не удалось открыть соединение с базой данных: SQLSTATE[HY000] [1044] Access denied for user 'vashtur_mysql'@'%' to database 'vashtur_db'

/home/vashtur/vashtur.ru/docs/framework/db/CDbConnection.php(348)

336                 throw new CDbException(Yii::t('yii','CDbConnection.connectionString cannot be empty.'));
337             try
338             {
339                 Yii::trace('Opening DB connection','system.db.CDbConnection');
340                 $this->_pdo=$this->createPdoInstance();
341                 $this->initConnection($this->_pdo);
342                 $this->_active=true;
343             }
344             catch(PDOException $e)
345             {
346                 if(YII_DEBUG)
347                 {
348                     throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection: {error}',
349                         array('{error}'=>$e->getMessage())),(int)$e->getCode(),$e->errorInfo);
350                 }
351                 else
352                 {
353                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
354                     throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection.'),(int)$e->getCode(),$e->errorInfo);
355                 }
356             }
357         }
358     }
359 
360     /**

Stack Trace

#7
+
 /home/vashtur/vashtur.ru/docs/protected/models/VacationTypes.php(20): CActiveRecord::model("VacationTypes")
15      * Returns the static model of the specified AR class.
16      * @return VacationTypes the static model class
17      */
18     public static function model($className=__CLASS__)
19     {
20         return parent::model($className);
21     }
22 
23     /**
24      * @return string the associated database table name
25      */
#8
+
 /home/vashtur/vashtur.ru/docs/protected/controllers/VacationTypesController.php(11): VacationTypes::model()
06         $models = VacationTypes::model()->findAll();
07         $this->render('index', array("models" => $models));
08     }
09 
10     public function actionView($id) {
11         $vt = VacationTypes::model()->find("url = '$id'");
12         if ($vt === null)
13             throw new CHttpException(404, 'The requested page does not exist.');
14         $models = CountriesVtypes::model()->findAll("vtype_id = '$vt->id'");
15         if ($vt->pagekeywords)
16             Yii::app()->clientScript->registerMetaTag($vt->pagekeywords, 'keywords');
#18
+
 /home/vashtur/vashtur.ru/docs/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 05:57:05 Apache/2.4.53 (Red Hat Enterprise Linux 8) PHP/5.6.40 Yii Framework/1.1.7