首页 文章

Magento SQLSTATE [42S01]错误

提问于
浏览
1

我的magento网站遇到了问题 . 它突然崩溃,甚至进入管理员,锁定了我 . 我联系了我们的主机以回滚我们的数据库,没有任何改变 . 我甚至删除了表中包含错误的表,并清除了我的本地缓存和/ var / cache /,但仍然没有 . 我在数据库中有数百种产品,并且不想将它们清除掉,我该如何解决这个问题?

文件错误:“/ home /sppower6 /public_html / app / code / core / Mage / Admin / sql / admin_setup / install-1.6.0.0.php” - SQLSTATE [42S01]:基表或视图已存在:1050表'admin_assert'已经存在,查询是:CREATE TABLE admin_assert(assert_id int UNSIGNED NOT NULL auto_increment COMMENT'Assert ID',assert_type varchar(20)NULL default NULL COMMENT'Assert Type',assert_data text NULL COMMENT'Assert Data',PRIMARY KEY (assert_id))COMMENT ='Admin Assert Table'ENGINE = INNODB charset = utf8 COLLATE = utf8_general_ci Trace:0 /home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645) :Mage :: exception('Mage_Core','文件错误:......')1 /home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(421):Mage_Core_Model_Resource_Setup - > _ modifyResourceDb('install','','1.6.1.1')2 /home/sppower6/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(327):Mage_Core_Model_Resource_Setup - > _ installResourceDb ('1.6.1.1')3 / home / sppower6 / public _html / app / code / core / Mage / Core / Model / Resource / Setup.php(235):Mage_Core_Model_Resource_Setup-> applyUpdates()4 / home / sppower6 / public_html / app / code / core / Mage / Core / Model / App .php(428):Mage_Core_Model_Resource_Setup :: applyAllUpdates()5 /home/sppower6/public_html/app/code/core/Mage/Core/Model/App.php(354):Mage_Core_Model_App - > _ initModules()6 / home / sppower6 /public_html/app/Mage.php(684):Mage_Core_Model_App-> run(Array)7 /home/sppower6/public_html/index.php(87):Mage :: run('','store')8

1 回答

  • 0

    只需删除 admin_assert

    SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_assert' already exists
    

    如果仍然发生,您可以刷新您的域名 yourdomain/index.php 直到它完成 .

    因为当 index.php 它将检查 all core_resource version at db 时,当它与 config.xml 不相同或更低时,它将 run mysql upgrade .

相关问题