If your server fails or if you choose to upgrade to a new machine you will need to manually transfer your Crystal PM database to the new computer. The following steps will demonstrate how to do this.

Prerequisites: You will need to make sure that none of your staff are currently working in Crystal and that the program is closed out on all workstations (including the server). You will need to budget for down time (30-60 minutes) depending on the size of your database. An external hard drive, flash drive or network location will be necessary to make the change over.

Note: The Crystal PM server/client software should be installed on the new server computer in advance.

To begin the database migration, you will need to stop the MySQL database. Click Start > All Programs > Accessories > right-click on the Command Prompt and select Run as Administrator.

The ‘administrative’ command prompt will appear.
Type in the following phrase where the cursor is flashing on this window: net stop mysql and press Enter.

The following window will appear informing you that the database was successfully stopped:

Minimize the Command Prompt and navigate to Start > Computer (or My Computer) > Local Disk (C:) > Program Files (or Program Files X86) > MySQL. Double-click on this folder.

Within the MySQL folder, click on data:

Within the data folder, you will see a folder titled easyopti:

Note: It is important to verify that your external device has sufficient space on it to transfer the database. To check the size of the database, right click on the easyopti folder and click properties:

The size of this database is 341 MB or 0.3 GB.

Verify that your external device is capable of containing this amount of data by reviewing the amount of space
available on the device (for this example, my device shows 4.06GB free of 7.45GB available).

Right-click on the easyopti folder and click ‘Copy’

Click on Start > Computer (or My Computer) > and locate your external device (mine is in the D drive):

Right-click on the removable device and click ‘Paste’. This will move a copy of the database to your external device:

The database will still be on the old server computer and can be deleted once the data has been moved.

Eject the removable device and connect it to the new server computer. The following window will appear:

Select ‘Open folder to view files’. Right-click on the easyopti folder and click ‘Copy’. Next you will need to stop the database on the new server computer. Navigate to Start > All Programs > Accessories > right-click on the Command Prompt and select Run as Administrator. The ‘administrative’ command prompt will appear. Type in the following phrase where the cursor is flashing on this
window: net stop mysql and press Enter:

The following window will appear informing you that the database was successfully stopped:

(Minimize the command prompt as you will need to go back to it after the transfer is complete)

You will now navigate to the new (empty) easyopti folder on the new server computer. Select Start > Computer (or My Computer) > Program Files (or Program Files X86) > MySQL > data

In the ‘white space’ below the folder right-click and choose ‘Paste‘. This will paste the easyopti folder (from the removable device) into the screen. You will be prompted to merge the new easyopti folder with the existing. Click yes to approve. If a screen appears referring to conflicts, select the ‘copy and replace’ option and check the box to approve for all conflicts.

Next, bring up the command prompt (that was previously minimized) and type in the following phrase: net start mysql and press enter:

You will be able to access Crystal PM.
Note: You will need to provide the server hostname to each of your workstations as you have switched computers and the information from the old server computer is no longer valid. You will also need to open TCP port 3306 in Windows Firewall on the new server computer if you are running this utility.

To locate the server computer hostname open the command prompt and type the term hostname.

For this example, the hostname of this computer is ‘Loki’. Enter this under Configuration > Server on your workstations and they will be able to connect and write to the Crystal PM database on the server computer.

If you’re IT person decides to move the Crystal PM database to a different drive on your server computer (for space requirements or performing backups), these are the necessary steps to facilitate this.

Note: You will need to ensure that none of your staff are working in Crystal while this is being done because the database will need to be shut down requiring all users to be out of the program (including the server computer).

For this example, I will move the live Crystal PM database to the ‘T’ drive:

Open this drive and create a folder titled ‘CPMData’:

To begin, click Start > All Programs > Accessories > (right-click on) Command Prompt and click Run as Administrator. Type in the phrase: net stop mysql and click Enter:

The database has been stopped at this point.
Minimize the command prompt window and navigate to Start > Computer (or My Computer) > Local Disk (C:) > Program Files (or Program Files X86) > MySQL.

Right-click on the MySQL folder and select ‘Copy’.

Navigate to the CPMData folder you created on the new drive you are switching the database to (exa: Start > Computer > downloads (\abeo) (T:) > CPMData. Once inside the CPMData folder, right-click and select ‘Paste’.

You will see the MySQL database folder in the CPMData folder at this point.

Note: This could take some time to accomplish depending on the size of your database.

Next, you will need to navigate to Start > Computer (or My Computer) > Local Disk (C:) > Windows > my.ini.
Double-click on my.ini and it will open in the Notepad.

You will need to edit the line ‘basedir=C :/program files/mysql to show (in my case):
datadir=T:/CPMData/mysql/data(Your data is now being stored/written to the file specified in this entry)
Save the changes to the my.ini folder and close out of it.
Now maximize the Command Prompt and enter the phrase: net start mysql

Crystal PM can now be accessed as usual on the server/workstation computers.