Win10 wamp 环境,按您上面文档操作,后台页【http://appadmin.fecshoptest.com/】 出现如下报错:
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) in D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php:687
Stack trace:
#0 D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php(687): PDO->__construct('mysql:host=127....', 'root', 'xxxxxx', NULL)
#1 D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php(613): yii\db\Connection->createPdoInstance()
#2 D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php(996): yii\db\Connection->open()
#3 D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php(983): yii\db\Connection->getMasterPdo()
#4 D:\web\fecshop\vendor\yiisoft\yii2\db\Command.php(253): yii\db\Connection->getSlavePdo()
#5 D:\web\fecshop\vendor\yiisoft\yii2\db\Command.php(1153): yii\db\Command->prepare(true)
#6 D:\web\fecshop\vendor\yiisoft\yii2\db\Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#7 D:\web\fecshop\vendor\yiisoft\yii2\db\mysql\Schema.php(319): yii\db\Command->queryAll()
#8 D:\web\fecshop\vendor\yiisoft\yii2\db\mysql\Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#9 D:\web\fecshop\vendor\yiisoft\yii2\db\Schema.php(744): yii\db\mysql\Schema->loadTableSchema('admin_user')
#10 D:\web\fecshop\vendor\yiisoft\yii2\db\Schema.php(194): yii\db\Schema->getTableMetadata('{{%admin_user}}', 'schema', false)
#11 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(435): yii\db\Schema->getTableSchema('{{%admin_user}}')
#12 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(262): yii\db\ActiveRecord::getTableSchema()
#13 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(234): yii\db\ActiveRecord::filterValidColumnNames(Object(yii\db\Connection), Array)
#14 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(191): yii\db\ActiveRecord::filterCondition(Array, Array)
#15 D:\web\fecshop\vendor\yiisoft\yii2\db\BaseActiveRecord.php(112): yii\db\ActiveRecord::findByCondition(Array)
#16 D:\web\fecshop\vendor\fancyecommerce\fecshop\models\mysqldb\AdminUser.php(85): yii\db\BaseActiveRecord::findOne(Array)
#17 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(595): fecshop\models\mysqldb\AdminUser::findIdentity(2)
#18 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(314): yii\web\User->getIdentityAndDurationFromCookie()
#19 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(707): yii\web\User->loginByCookie()
#20 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(192): yii\web\User->renewAuthStatus()
#21 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(360): yii\web\User->getIdentity()
#22 D:\web\fecshop\vendor\yiisoft\yii2\base\Component.php(139): yii\web\User->getIsGuest()
#23 D:\web\fecshop\vendor\yiisoft\yii2-debug\src\panels\UserPanel.php(79): yii\base\Component->__get('isGuest')
#24 D:\web\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): yii\debug\panels\UserPanel->init()
#25 [internal function]: yii\base\BaseObject->__construct(Array)
#26 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#27 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('yii\\debug\\panel...', Array, Array)
#28 D:\web\fecshop\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('yii\\debug\\panel...', Array, Array)
#29 D:\web\fecshop\vendor\yiisoft\yii2-debug\src\Module.php(182): yii\BaseYii::createObject(Array)
#30 D:\web\fecshop\vendor\yiisoft\yii2-debug\src\Module.php(154): yii\debug\Module->initPanels()
#31 D:\web\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): yii\debug\Module->init()
#32 D:\web\fecshop\vendor\yiisoft\yii2\base\Module.php(158): yii\base\BaseObject->__construct(Array)
#33 [internal function]: yii\base\Module->__construct('debug', Object(yii\web\Application), Array)
#34 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(376): ReflectionClass->newInstanceArgs(Array)
#35 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('yii\\debug\\Modul...', Array, Array)
#36 D:\web\fecshop\vendor\yiisoft\yii2\BaseYii.php(345): yii\di\Container->get('yii\\debug\\Modul...', Array)
#37 D:\web\fecshop\vendor\yiisoft\yii2\base\Module.php(427): yii\BaseYii::createObject('yii\\debug\\Modul...', Array)
#38 D:\web\fecshop\vendor\yiisoft\yii2\base\Application.php(315): yii\base\Module->getModule('debug')
#39 D:\web\fecshop\vendor\yiisoft\yii2\web\Application.php(69): yii\base\Application->bootstrap()
#40 D:\web\fecshop\vendor\yiisoft\yii2\base\Application.php(273): yii\web\Application->bootstrap()
#41 D:\web\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): yii\base\Application->init()
#42 D:\web\fecshop\vendor\yiisoft\yii2\base\Application.php(206): yii\base\BaseObject->__construct(Array)
#43 D:\web\fecshop\appadmin\web\index.php(76): yii\base\Application->__construct(Array)
#44 {main}
Next yii\db\Exception: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) in D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php:624
Stack trace:
#0 D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php(996): yii\db\Connection->open()
#1 D:\web\fecshop\vendor\yiisoft\yii2\db\Connection.php(983): yii\db\Connection->getMasterPdo()
#2 D:\web\fecshop\vendor\yiisoft\yii2\db\Command.php(253): yii\db\Connection->getSlavePdo()
#3 D:\web\fecshop\vendor\yiisoft\yii2\db\Command.php(1153): yii\db\Command->prepare(true)
#4 D:\web\fecshop\vendor\yiisoft\yii2\db\Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#5 D:\web\fecshop\vendor\yiisoft\yii2\db\mysql\Schema.php(319): yii\db\Command->queryAll()
#6 D:\web\fecshop\vendor\yiisoft\yii2\db\mysql\Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#7 D:\web\fecshop\vendor\yiisoft\yii2\db\Schema.php(744): yii\db\mysql\Schema->loadTableSchema('admin_user')
#8 D:\web\fecshop\vendor\yiisoft\yii2\db\Schema.php(194): yii\db\Schema->getTableMetadata('{{%admin_user}}', 'schema', false)
#9 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(435): yii\db\Schema->getTableSchema('{{%admin_user}}')
#10 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(262): yii\db\ActiveRecord::getTableSchema()
#11 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(234): yii\db\ActiveRecord::filterValidColumnNames(Object(yii\db\Connection), Array)
#12 D:\web\fecshop\vendor\yiisoft\yii2\db\ActiveRecord.php(191): yii\db\ActiveRecord::filterCondition(Array, Array)
#13 D:\web\fecshop\vendor\yiisoft\yii2\db\BaseActiveRecord.php(112): yii\db\ActiveRecord::findByCondition(Array)
#14 D:\web\fecshop\vendor\fancyecommerce\fecshop\models\mysqldb\AdminUser.php(85): yii\db\BaseActiveRecord::findOne(Array)
#15 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(595): fecshop\models\mysqldb\AdminUser::findIdentity(2)
#16 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(314): yii\web\User->getIdentityAndDurationFromCookie()
#17 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(707): yii\web\User->loginByCookie()
#18 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(192): yii\web\User->renewAuthStatus()
#19 D:\web\fecshop\vendor\yiisoft\yii2\web\User.php(360): yii\web\User->getIdentity()
#20 D:\web\fecshop\vendor\yiisoft\yii2\base\Component.php(139): yii\web\User->getIsGuest()
#21 D:\web\fecshop\vendor\yiisoft\yii2-debug\src\panels\UserPanel.php(79): yii\base\Component->__get('isGuest')
#22 D:\web\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): yii\debug\panels\UserPanel->init()
#23 [internal function]: yii\base\BaseObject->__construct(Array)
#24 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(384): ReflectionClass->newInstanceArgs(Array)
#25 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('yii\\debug\\panel...', Array, Array)
#26 D:\web\fecshop\vendor\yiisoft\yii2\BaseYii.php(349): yii\di\Container->get('yii\\debug\\panel...', Array, Array)
#27 D:\web\fecshop\vendor\yiisoft\yii2-debug\src\Module.php(182): yii\BaseYii::createObject(Array)
#28 D:\web\fecshop\vendor\yiisoft\yii2-debug\src\Module.php(154): yii\debug\Module->initPanels()
#29 D:\web\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): yii\debug\Module->init()
#30 D:\web\fecshop\vendor\yiisoft\yii2\base\Module.php(158): yii\base\BaseObject->__construct(Array)
#31 [internal function]: yii\base\Module->__construct('debug', Object(yii\web\Application), Array)
#32 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(376): ReflectionClass->newInstanceArgs(Array)
#33 D:\web\fecshop\vendor\yiisoft\yii2\di\Container.php(156): yii\di\Container->build('yii\\debug\\Modul...', Array, Array)
#34 D:\web\fecshop\vendor\yiisoft\yii2\BaseYii.php(345): yii\di\Container->get('yii\\debug\\Modul...', Array)
#35 D:\web\fecshop\vendor\yiisoft\yii2\base\Module.php(427): yii\BaseYii::createObject('yii\\debug\\Modul...', Array)
#36 D:\web\fecshop\vendor\yiisoft\yii2\base\Application.php(315): yii\base\Module->getModule('debug')
#37 D:\web\fecshop\vendor\yiisoft\yii2\web\Application.php(69): yii\base\Application->bootstrap()
#38 D:\web\fecshop\vendor\yiisoft\yii2\base\Application.php(273): yii\web\Application->bootstrap()
#39 D:\web\fecshop\vendor\yiisoft\yii2\base\BaseObject.php(109): yii\base\Application->init()
#40 D:\web\fecshop\vendor\yiisoft\yii2\base\Application.php(206): yii\base\BaseObject->__construct(Array)
#41 D:\web\fecshop\appadmin\web\index.php(76): yii\base\Application->__construct(Array)
#42 {main}
Additional Information: