Vtiger CRM DB Migration between two machines
From vtiger.com
Vtiger CRM DB Migration in between two machines
(Revision as of 09:11, 21 May 2006)
Procedure to migrate data from one machine to other machine:
1. Original database dumped to file using command:
mysqldump --user=root --password= --port=3306 -h localhost vtigercrm4_2 > vtigercrm_dump.txt
(I created a batch containing this line file for future use! This was placed in the directory C:\Program Files\vtigerCRM4_2\mysql\bin and run.)
2. On a clean installation of vtiger CRM 4.2, install patch 2:
- extract zip file to c:\program files\vtigercrm4_2\apache\htdocs\vtigerCRM
- in browser, run http://localhost/vtigerpatch.php to install the patch.
Before restoring the data onto the clean installation, open the file vtigerCRM4_2.txt in a text editor. At the start of the file, add the line:
set FOREIGN_KEY_CHECKS=0;
At the end of the file, add the line:
set FOREIGN_KEY_CHECKS=1;
Save the file, and place in the directory
C:\Program Files\vtigerCRM4_2\mysql\bin
It is now necessary to 'drop' the old database. From a command prompt in the directory C:\Program Files\vtigerCRM4_2\mysql\bin
type in the line:
mysql -u root -p
When prompted for the password, enter the password or press <enter> if none required.
You will now be faced with teh mysql prompt. Drop the database with the command:
drop database vtigercrm4_2;
Once this is complete, create a new database with the command:
create database vtigercrm4_2;
Quit the database.
From the directory: C:\Program Files\vtigerCRM4_2\mysql\bin Rune the following command to restore the database:
mysql --user=root --password= --port=3306 -h localhost vtigercrm4_2 --force < vtigercrm_dump.txt
