Our storefront, at store.fraudfighter.com, suddenly started serving up the below error message. It's pretty much out of the blue. I can't even access via my admin panel, because when I try to navigate to the admin log-in, I get the same exact error page...???
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fraud_storenew.core_store' doesn't exist
Trace:
#0 /home/fraud/public_html/store/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/fraud/public_html/store/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/fraud/public_html/store/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/fraud/public_html/store/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /home/fraud/public_html/store/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /home/fraud/public_html/store/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
#6 /home/fraud/public_html/store/lib/Varien/Data/Collection/Db.php(730): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
#7 /home/fraud/public_html/store/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(521): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
#8 /home/fraud/public_html/store/lib/Varien/Data/Collection/Db.php(566): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /home/fraud/public_html/store/app/code/core/Mage/Core/Model/Resource/Store/Collection.php(174): Varien_Data_Collection_Db->load(false, false)
#10 /home/fraud/public_html/store/lib/Varien/Data/Collection.php(752): Mage_Core_Model_Resource_Store_Collection->load()
#11 /home/fraud/public_html/store/app/code/core/Mage/Core/Model/App.php(624): Varien_Data_Collection->count()
#12 /home/fraud/public_html/store/app/code/core/Mage/Core/Model/App.php(466): Mage_Core_Model_App->_initStores()
#13 /home/fraud/public_html/store/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Model_App->_initCurrentStore('', 'store')
#14 /home/fraud/public_html/store/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /home/fraud/public_html/store/index.php(87): Mage::run('', 'store')
#16 {main}
-
May be my mistake some has remove that data base because this is core Table of magento please check your databaseKeyul Shah– Keyul Shah2015年06月21日 10:38:58 +00:00Commented Jun 21, 2015 at 10:38
2 Answers 2
Do you have database backup? Seems like your database was corrupted. Also I suggest to check database table list. Enter mysql server and type:
SHOW TABLES;
And show here the result
Seems like your database is lost.
Try these first:
- Check your database to ensure there is a
core_store(or variant) table available. - Check to make sure your
local.xmlconfig file is pointing to the right database. - Ask your host to restore from
another restore point. Check to ensure your
local.xmldidn't have a table prefix recently added or removed.
If these things are correct then:
If only one table is affected, then you can install it by running this query in to your database:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default data:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);