KB Article #177303

Procedure to migrate from the CG embedded MySQL DB to an external MySQL DB

Problem

How to migrate from the embedded MySQL DB to an external MySQL DB

DB migration procedure from embedded MySQL DB to an external MySQL DB

Resolution

Attention, the procedure below has been validated with:

CG 1.0.3 SP6

MySQL version 5.6.18 (minimum pre-requisite)

This procedure has been validated for MySQL to MySQL only, not for MySQL to SqlServer or Oracle Database.


Migration steps:


1. Backup you CG installation directory


2. Stop CG


3. Export the 3 MySQL internal databases : Certificates, Visibility & Dashboards

  • Sample : mysqldump –u {conf.db.root.login} –p{conf.db.root.password} –P {conf.db.port} –-all-databases > dumpfile.sql

4. Import the 3 MySQL internal databases to MySQL external databases

  • Sample : mysql –u {conf.db.root.login} –p{conf.db.root.password} –P {conf.db.port} < dumpfile.sql


5. Change the configuration : …\CentralGovernance\data\ conf.properties


a. Remove the line MSQL_PORT=3307 (default value)
b. Change the url and the user of each database connection :

    1. DASHBOARDS_DB_URL=jdbc\:mysql\://hostmysqldb\:3306/dashboards
    2. DASHBOARDS_DB_USER=dashboards
    3. PASSPORT_DB_URL=jdbc\:mysql\:// hostmysqldb \:3306/certificates
    4. PASSPORT_DB_USER=certificates
    5. SENTINEL_DB_URL=jdbc\:mysql\:// hostmysqldb \:3306/visibility
    6. SENTINEL_DB_USER=visibility

6. Configure CG


a. Set the password of each database : certificates, visibility and dashboards
b. Check the connection of each database


7. Start CG


8. Connect to CG