Sometimes when you moved magento  from dev to live or changed database you have Not Found 404 Error when you trying to access admin panel.  Also it may happen when you moving your site to another server. If you have enabled system log you may check var/log/system.log and there will be something like:

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATHppcodecoreMageCoreModelApp.php on line 555 and defined in YOUR_PATHppcodecoreMageCoreModelStore.php on line 285

Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in YOUR_PATHppcodecoreMageCoreModelApp.php on line 575 and defined in YOUR_PATHppcodecoreMageCoreModelStoreGroup.php on line 227

Also you may see this Notice message:

Notice: Undefined index: 0 in app/code/core/Mage/Core/Model/Mysql4/Config.php on line 92


The solution of this issue is simple.

To solve this issue Open PhPMyAdmin in your cpanel or Plesk panel, choose your magento database, and clikc SQL. Then execute there the following SQL Query:

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;