我已经将一个magento网站从一台服务器复制到另一台服务器,希望能够制作商店的副本。
我通过phpMyAdmin导出/导入数据库,我压缩并解压缩了网站文件。
一切都在那里。我已经加倍检查了数据库密码和详细信息。我还检查了所有文件/文件夹权限是否正确。我仍然得到错误。
这个错误说......
There has been an error processing your request
Exception printing is disabled by default for security reasons.
以下是我的Magento错误日志的内容:
a:4:{i:0;s:97:
"SQLSTATE[HY000] [1045] Access denied for user 'MYSITE_magento'@'localhost' (using password: YES)"
;i:1;s:2792:"
#0 /home/MYSITE/public_html/lib/Zend/Db/Adapter/Pdo/Mysql.php(96): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/MYSITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(251): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/MYSITE/public_html/lib/Zend/Db/Adapter/Abstract.php(448): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /home/MYSITE/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /home/MYSITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Resource.php(93): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#7 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(297): Mage_Core_Model_Resource->getConnection('core_read')
#8 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(312): Mage_Core_Model_Mysql4_Abstract->_getConnection('read')
#9 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(332): Mage_Core_Model_Mysql4_Abstract->_getReadAdapter()
#10 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php(97): Mage_Core_Model_Mysql4_Abstract->getReadConnection()
#11 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Config.php(1206): Mage_Core_Model_Mysql4_Collection_Abstract->__construct(Object(Mage_Core_Model_Mysql4_Website))
#12 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Config.php(1239): Mage_Core_Model_Config->getModelInstance('core_mysql4/web...', Object(Mage_Core_Model_Mysql4_Website))
#13 /home/MYSITE/public_html/app/Mage.php(460): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Mysql4_Website))
#14 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Mysql4_Website))
#15 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#16 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/App.php(532): Mage_Core_Model_Abstract->getCollection()
#17 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/App.php(393): Mage_Core_Model_App->_initStores()
#18 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/App.php(299): Mage_Core_Model_App->_initCurrentStore('', 'store')
#19 /home/MYSITE/public_html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#20 /home/MYSITE/public_html/index.php(80): Mage::run('', 'store')
#21 {main}
";s:3:"url";s:10:"/~MYSITE/";s:11:"script_name";s:19:"/~MYSITE/index.php";}
显然我用MYSITE替换了上面的网站名称。
答案 0 :(得分:2)
可以为local.xml .
创建此问题首先,在local.xml中检查database username ,database name,datauser password
.....等(路径yourmagentodir/app/etc/
)
检查是否有local.xml.bak
。如果退出则delet
e local.xml.bak。
检查数据库permission issue for database user.
从缓存文件夹清除缓存(路径yourmagentodir/var/cache/
)
答案 1 :(得分:0)
这是一个腐败的数据库。谢谢你钻进我的家伙,因为它迫使我继续重新检查数据库