Configure Hue to Store Data in MySQL or MariaDB

About this task

Hue supports MySQL 5.5.x - 5.7.x. Hue does not support MySQL 8 and later.

Procedure

  1. Configure the database connection parameters in the [desktop][[database]] section of hue.ini. Set the following properties with your database connection parameters:
    [desktop]
      ...
      [[database]]
        engine=mysql
        host=<host>
        port=3306
        user=<user>
        password='<password>'
        name=<database>
    
    Example of configuration:
    [desktop]
      ...
      [[database]]
        engine=mysql
        host=node1
        port=3306
        user=hue
        password=hue_password
        name=hue
    
    If the connection is secured through SSL/TLS, specify the CA, Cert, and Key paths, as shown in the following example:
    [desktop]
    [[database]]
    ...
    options='{"ssl": {"key": "/path/to/client-key.pem", "cert": "/path/to/client-cert.pem", "ca": "/path/to/ca.pem"}}'
    You can find detailed documentation for other options in the Django Connecting to the Database documentation.
  2. Perform the initial data migration:
    sudo /opt/mapr/server/configure.sh -R                
  3. Restart Hue:
    maprcli node services -name hue -action restart -nodes <node_with_hue>