Monday, May 9, 2011

Moving local files to live Server : can not login into admin panel

Last night i tried to move files from local to live server. Everything was fine but I couldnt login to admin side. So I went through the live website database and local database I noticed that admin values are changed for the below tables.

core_store
core_store_group
core_website
customer_group

SET FOREIGN_KEY_CHECKS = 0;
UPDATE `core_store` SET `store_id` = '0' WHERE `store_id` = 1 LIMIT 1 ;
UPDATE `core_store` SET `store_id` = '1' WHERE `store_id` = 2 LIMIT 1 ;

UPDATE `core_store_group` SET `group_id` = '0' WHERE `group_id` = 1 LIMIT 1 ;
UPDATE `core_store_group` SET `group_id` = '1' WHERE `group_id` = 2 LIMIT 1 ;

UPDATE `core_website` SET `website_id` = '0' WHERE `website_id` = 1 LIMIT 1 ;
UPDATE `core_website` SET `website_id` = '1' WHERE `website_id` = 2 LIMIT 1 ;

UPDATE `customer_group` SET `customer_group_id` = '0' WHERE `customer_group_id` = 1 LIMIT 1 ;
UPDATE `customer_group` SET `customer_group_id` = '1' WHERE `customer_group_id` = 2 LIMIT 1 ;
UPDATE `customer_group` SET `customer_group_id` = '2' WHERE `customer_group_id` = 3 LIMIT 1 ;
UPDATE `customer_group` SET `customer_group_id` = '3' WHERE `customer_group_id` = 4 LIMIT 1 ;
SET FOREIGN_KEY_CHECKS = 1;

No comments:

Post a Comment