Skip to main content

HighGo Database Integration Guide

HAP Server uses MySQL as its default relational database. Since v5.4.3, it also supports Xugu. For environments with domestic technology requirements, you can use this database instead of MySQL.

Follow these integration steps:

  1. Deploy HighGo Security Edition V4.5 in standalone or cluster mode (enable MySQL compatibility mode).

    For HAP standalone deployments or simplified clusters, choose standalone mode. For standard or professional clusters, choose cluster mode.

  2. After deploying HighGo, download the HAP database initialization scripts and upload them to the HighGo environment.

  3. Initialize the data

    Connect to HighGo using psql. See the psql User Guide. The ksql command is available after deploying HighGo.

    Run the initialization scripts (adjust the IP address, port, username and SQL file paths for your environment). Enter the password when prompted.

    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/1_Database_g.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/1_Database_s.sql -d mdproject
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/1_Database_s.sql -d mdapplication
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/1_Database_s.sql -d mdcalendar
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/1_Database_s.sql -d mdstructure
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/1_Database_s.sql -d mdlog
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/2_MDProject.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/3_MDStructure.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/4_MDApplication.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/5_MDCalendar.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/6_MDLog.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/7_Data_MDProject.sql
    psql -h 127.0.0.1 -p 5866 -U sysdba -f /usr/local/init_highgo/8_Data_MDApplication.sql
  4. Initialize HAP services

    Before initializing services, add the following environment variables (replace connection parameter values with actual values):

    ENV_RDB_TYPE: "6"
    ENV_RDB_URI_MDPROJECT: "Server=127.0.0.1;Port=5866;User Id=sysdba;Password=******;Database=mdproject;"
    ENV_RDB_URI_MDLOG: "Server=127.0.0.1;Port=5866;User Id=sysdba;Password=******;Database=mdlog;"
    ENV_RDB_URI_MDSTRUCTURE: "Server=127.0.0.1;Port=5866;User Id=sysdba;Password=******;Database=mdstructure;"
    ENV_RDB_URI_MDCALENDAR: "Server=127.0.0.1;Port=5866;User Id=sysdba;Password=******;Database=mdcalendar;"
    ENV_RDB_URI_MDAPPLICATION: "Server=127.0.0.1;Port=5866;User Id=sysdba;Password=******;Database=mdapplication;"
    ENV_STANDALONE_DISABLE_SERVICES: "mysql"
  5. Complete the remaining system initialization steps.