Installing DataPlane
Also available as:
PDF

Configure MySQL/MariaDB external database

It is strongly recommended to use an external database for production environments. After installing the database following the instructions provided with the database software, you must set up the database for use with DataPlane.

  • The MySQL/MariaDB database server must have been installed and properly configured for remote access.
  • A database must have been created. Note that you should create the DB which is UTF-8 encoding compliant.
  • You can use the following queries to configure database for DataPlane. Make sure to replace dbname, username and password.
CREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER username IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO username@'%';
flush privileges;
  • Download the MySQL JDBC driver.

    You must download MySQL driver from the following URL:

    MySQL Driver Download.

    Note
    Note
    You can use any latest version of MySQL JDBC driver.
  1. Open the <installer_home>/config.env.sh file for editing.
    vi /usr/dp/current/core/bin/config.env.sh
  2. Modify the configuration parameters as shown below.
    USE_EXTERNAL_DB="yes" 
    DB_TYPE="MySQL"
    DATABASE_URI="jdbc:mysql://<host_name>:<port>/<dataplane>"
    DATABASE_USER="<username>"
    DATABASE_PASS="<password>"
    MYSQL_DRIVER_LOCATION="</path/to/mysql/mysql-connector-java-8.0.19.jar>"
    Note
    Note
    You must update the parameter values as per your production environment. Make sure to update MySQL_DRIVER_LOCATION variable with MySQL driver JAR file (absolute path) as well.

    If you need to connect to the database through an SSL connection, modify the DATABASE_URI parameter in the above example as follows:

    
    DATABASE_URI="jdbc:mysql://<host_name>:<port>/<database_name>?verifyServerCertificate=false&useSSL=true"
                   
    The MySQL database is configured.