Background
Prior to CentreStack version 9.5.5409.41172, the default database engine for the "all in one" deployment was Microsoft SQL Server Express Edition. This article describes the process of migrating from an existing SQL Server Express database from an older version of CentreStack to a MySQL running as a service. This migration is recommended for CentreStack deployments that may be affected by the limitations of SQL Server Express Edition.
Procedure
1. Start an elevated command prompt (as Administrator) and execute these commands:
reg.exe export "HKLM\SOFTWARE\Gladinet\Enterprise" "%userprofile%\Documents\gcent64.reg"
reg.exe export "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Gladinet\Enterprise" "%userprofile%\Documents\gcent32.reg"
This will backup the registry settings that configure CentreStack for the existing SQL Server Express Edition database.
2. Backup the SQL Server Express Edition database. Read this article and download the PowerShell script to backup the database, unless you are familiar with backing up SQL Server: https://support.centrestack.com/hc/en-us/articles/360003603493-SQL-Server-Backup-Script
3. If feasible, backup the entire CentreStack operating system (as in "make an image"). If this is not feasible, at least backup the entire "C:\Program Files (x86)\Gladinet Cloud Enterprise" directory
4. Download MySQL running as a service: https://support.centrestack.com/hc/en-us/articles/360015757093-Installing-MySQL-Community-Server
To verify that it was installed correctly, start an elevated PowerShell session and verify that MySQL is running by executing (TCP 3306 is the port MySQL is listening on):
Get-Process | ? {$_.Id -eq (Get-NetTCPConnection -LocalPort 3306 | Select -First 1).OwningProcess}
The output of the previous command should be ProcessName as mysqld, the name of the MySQL process. For example:
5. After the upgrade, sign into the CentreStack server console (or RDP) and use the browser to navigate to: http://localhost/management/migratedatabase.aspx
This screen will be displayed:
6. From the Drop Down Menu Select MySQL and wait for the screen to update with the fields shown below:
7. The following fields will apply if you have installed MySQL on the same server as CentreStack:
Host Name: localhost
Port: 3306
Database Name: csmain
User Name: csuser
Password: From install script or set from Workbench
8. Click the Migrate button to kickoff the migration task, you will be prompted that the database already exists because the script creates an empty database csmain when creating the csuser:
9. Depending on how large your existing database is the migration might take a while to perform:
10. Once the migration has completed you will see the screen that says "Completed successfully!":
11. On your server, point the browser to localhost and login as the cluster admin:
If the CentreStack web site loads, it is a very good indication that the migration succeeded and MySQL is working correctly. You could use the Reports section to verify that old data (such as the Audit records) can be retrieved.
12. Open SQL Workbench and run the following query: SELECT * FROM csmain.xaf_audit ORDER BY timestamp DESC;
14. If you see your login with the correct date & time from when you logged in, it will be a good indicator that the migration was successful and that MySQL is now the database CentreStack is running.
15. Once you are confident that MySQL is running, execute these PowerShell commands to stop the SQL Server service and configure it to be disabled at boot time:
Stop-Service 'MSSQL$CENTRESTACK'
Set-Service 'MSSQL$CENTRESTACK' -StartupType Disabled
Comments
0 comments
Please sign in to leave a comment.