shmuli
shmuli

Reputation: 5192

Copying a Magento Installation to Another Local Machine

WHAT I'M TRYING TO DO AND WHAT'S BLOCKING ME

I have a Magento installation on a WAMP server in localhost and I'm trying to move that installation over to another machine running a localhost WAMP server as well. I'm encountering some difficulties, because when I point the browser to the appropriate directory, I get the following error:

enter image description here

WHAT I'VE DONE

To clone the installation to the second machine, these are the steps I took:

HOW I TRIED RESOLVING THIS

I tried resolving the above error by renaming the local.xml.sample file in the magento/errors/ directory to local.xml. But when I did that, I encountered this next error:

enter image description here

FULL TEXT OF THE ERROR

This is the full text of the error:

Error in file: "C:\wamp\www\NAME-OF-PROJECT\magento\app\code\core\Mage\Core\sql\core_setup\install-1.6.0.0.php" - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.core_resource' doesn't exist

Trace:
0 C:\wamp\www\NAME-OF-PROJECT\magento\includes\src\Mage_Core_Model_Resource_Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
1 C:\wamp\www\NAME-OF-PROJECT\magento\includes\src\Mage_Core_Model_Resource_Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.4')
2 C:\wamp\www\NAME-OF-PROJECT\magento\includes\src\Mage_Core_Model_Resource_Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.0.4')
3 C:\wamp\www\NAME-OF-PROJECT\magento\includes\src\Mage_Core_Model_Resource_Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
4 C:\wamp\www\NAME-OF-PROJECT\magento\includes\src\__default.php(20768): Mage_Core_Model_Resource_Setup::applyAllUpdates()
5 C:\wamp\www\NAME-OF-PROJECT\magento\includes\src\__default.php(20694): Mage_Core_Model_App->_initModules()
6 C:\wamp\www\NAME-OF-PROJECT\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
7 C:\wamp\www\NAME-OF-PROJECT\magento\index.php(87): Mage::run('', 'store')
8 {main}

MY DATABASE TABLES

Here's a snapshot from phpMyAdmin of the tables I have loaded:

enter image description here

PLEASE HELP ME TROUBLESHOOT THIS

I'm unsure why I'm getting this error and why Magento is unable to locate the table. Does it assume that there's a table prefix? If it does, where can I change that? Any help to successfully install a copy of this site onto another local machine would be appreciated. Thanks in advance!

Upvotes: 2

Views: 1194

Answers (3)

Nakmadara
Nakmadara

Reputation: 1

I had encounter this problem once. From what i have done:

1: This path C:\wamp\bin\mysql\mysql5.6.17\data\tablename try to delete everything in these folder.

2: Past your new magento to the wamp folder and do what you do again it might work.

Upvotes: 0

Elavarasan
Elavarasan

Reputation: 2669

Shmuli, Normally the moving databases (moving data directory from Mysql) should be worked. I didn't faced like this problem, and I have did many times. But in your case, I don't know exactly what is the problem. As for my knowledge this problem encountered by the log files. Mysql server creates some log files in your data directory.

That's like ib_logfile0 , ib_logfile1 in latest Mysql server. In old mysql server the log file should be like this mysql-bin.xxxx. For more information go link-1. and link-2 You need to clear this before moving databases. Don't worry Mysql sever will create again those files.

And anyway direct export and import will solve this. For fast export, import (some magento database files may be very huge. It depends your store's catalog) try to use command line.

For export:

mysql -u root -p Db-name > Db-name.sql 

(root is username)

after entered the password you will be get your database.

For import:

mysql -u root -p Db-name < Db-name.sql 

(Db-name.sql -> give the sql file path)

That's it, any doubt please comment here.

Upvotes: 1

Christophe Ferreboeuf
Christophe Ferreboeuf

Reputation: 1058

if the location or the credentials of you database have been changed, you need to change them as well in the app/etc/local.xml

if the urls of your installation have changed, you need to change them as well in core_config_data. the same for cookies domain name.

Upvotes: 3

Related Questions