Configuring the database connection

Follow these instructions to write the database connection string in the IBM Spectrum LSF Application Center configuration file $PERF_TOP/conf/datasource.xml with encrypted passwords.

Before you begin

Ensure that you have a user name, password, and URL to access the database.

Procedure

  1. As root, log on to your LSF Application Center server host.
  2. Set your environment:

    For example:

    • For csh or tcsh:
      % source /opt/ibm/lsfsuite/ext/cshrc.platform
    • For sh, ksh, or bash:
      $ . opt/ibm/lsfsuite/ext/profile.platform
  3. Start the database configuration tool.

    Run the command $PERF_TOP/1.2/bin/dbconfig.sh -edit ReportDB -console.

  4. In the User ID and Password fields, specify the user account name and password with which to connect to the database.
  5. In the JDBC driver field, select the driver for your database. Select 0 for the MariaDB driver.
  6. In the JDBC URL field, enter the URL for your database.

    For example:

    jdbc:mariadb://mydbhost:3306/pac?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT
  7. In the Maximum connections field, specify the value of 100, the maximum allowed number of concurrent connections to the database server.
  8. Enter 1 to test your database connection.
  9. Enter 2 to save and exit.
  10. Check that the file $PERF_TOP/conf/datasource.xml was updated.

    For example:

    
    <ds:DataSource Name="ReportDB" 
            Driver="org.gjt.mm.mysql.Driver" 
            Connection="jdbc:mariadb://mydbhost:3306/pac?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT " 
            Default="true" 
            Cipher="des56" 
            UserName="uOTzmooF4Qw=" 
            Password="uOTzmooF4Qw="> 
            <ds:Properties> 
                <ds:Property> 
                     <ds:Name>maxActive</ds:Name> 
                     <ds:Value>100</ds:Value> 
                </ds:Property> 
            </ds:Properties> 
    </ds:DataSource>