简体   繁体   English

处理请求时出错:SQLSTATE [42S01]:基表或视图已存在:在magento 1.9中

[英]Error processing your request: SQLSTATE[42S01]: Base table or view already exists: in magento 1.9

I have installed magento 1.9 CE on my local server and it was working fine. 我在我的本地服务器上安装了magento 1.9 CE,它工作正常。 Suddenly it stopped working and shows error like 突然它停止工作并显示错误

There has been an Error processing your request. 处理您的请求时出错。

When I check error report from report folder then I got logs like 当我从报告文件夹检查错误报告时,我得到了日志

a:5:{i:0;s:219:"Error in file: "C:\wamp\www\anzonline\app\code\core\Mage\XmlConnect\sql\xmlconnect_setup\upgrade-1.6.0.0-1.6.0.0.1.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'xmlconnect_images' already exists";i:1;s:950:"
#0 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.0', '1.6.0.0.1')
#2 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0', '1.6.0.0.1')
#3 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#6 C:\wamp\www\anzonline\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#7 C:\wamp\www\anzonline\index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:11:"/anzonline/";s:11:"script_name";s:20:"/anzonline/index.php";s:4:"skin";s:7:"default";}

I have found several solutions from Google but none of those worked out for me example . 我找到了Google几个解决方案,但没有一个解决方案的例子

The error message is telling you that Magento tries to create a table which already exists. 错误消息告诉您Magento尝试创建已存在的表。 This takes place in an upgrade script and was probably caused by an incomplete previous run of said upgrade script. 这发生在升级脚本中,可能是由于所述升级脚本的上一次运行不完整所致。 Magento executes upgrade scripts, but only marks them done when they complete without error. Magento执行升级脚本,但只有在完成时才会标记完成而没有错误。 Even an incompletely run script can have created tables, though, and next time Magento tries to run that update script the exstance of those tables cause a problem. 即使是运行不完整的脚本也可以创建表,但下次Magento尝试运行该更新脚本时,这些表的存在会导致问题。

So you can either do some Database work and do some tweeking like removing the tables in question (with saving the data if needed), or you redo your Magento Installation. 因此,您可以执行某些数据库工作并执行一些调整,例如删除有问题的表(如果需要,可以保存数据),或者重做Magento安装。

This can also be caused by recently installed extensions, if so uninstalling them with the Connect Manager and reinstalling them might work. 这也可能是由最近安装的扩展引起的,如果是这样,使用Connect Manager卸载它们并重新安装它们可能会起作用。

Use 使用

DROP TABLE IF EXISTS xmlconnect_images; DROP TABLE IF EXISTS xmlconnect_images;

then, refresh your brownser. 然后,刷新你的棕色。 It works for me. 这个对我有用。

You can clear cache if you dont see any changes: 如果您没有看到任何更改,则可以清除缓存:

To clear the cache, simply delete everything from the /var/cache directory and then reload your website in your browser. 要清除缓存,只需从/ var / cache目录中删除所有内容,然后在浏览器中重新加载您的网站。

rm -rf magento/var/cache/* rm -rf magento / var / cache / *

To clear all sessions, you can also delete everything from the /var/session folder within your Magento installation directory. 要清除所有会话,还可以从Magento安装目录中的/ var / session文件夹中删除所有内容。

rm -rf magento/var/session/* rm -rf magento / var / session / *

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误处理请求:文件错误:-SQLSTATE [42S01]:基表或视图已存在: - Error Processing Request: Error in file: - SQLSTATE[42S01]: Base table or view already exists: laravel中如何修复“ SQLSTATE [42S01]:基本表或视图已存在”错误 - How to fix 'SQLSTATE[42S01]:base table or view already exists' error in laravel Laravel 错误:SQLSTATE[42S01]:基表或视图已存在:1050 表“类别”已存在 - Laravel Error : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'categories' already exists SQLSTATE [42S01]:基本表或视图已存在或基本表或视图已存在:1050表 - SQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Table SQLSTATE[42S01]:基表或视图已存在:1050 表“付款”已存在(SQL:创建表“付款” - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'payments' already exists (SQL: create table `payments` SQLSTATE [42S01]:基本表或视图已存在:1050表'weee_tax'已存在,查询为 - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'weee_tax' already exists, query was Illuminate\Database\QueryException SQLSTATE[42S01]:基表或视图已存在:1050 表“发票”已存在 - Illuminate\Database\QueryException SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'invoices' already exists Laravel 中的数据模型错误(SQLSTATE[42S01]) - Error with data model in Laravel (SQLSTATE[42S01]) magento 1.9错误-SQLSTATE [42S02]:找不到基本表或视图:1146表'domain name.log_visitor'不存在 - Error with magento 1.9 - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'domain name.log_visitor' doesn't exist 警告:为“ catalog_items”创建夹具失败“ SQLSTATE [42S01] - Warning: Fixture creation for “catalog_items” failed " SQLSTATE[42S01]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM