Installing HDP Manually
Also available as:
PDF
loading table of contents...

Using Hue with MySQL

To set up Hue to use a MySQL database:

  1. Create a new user in MySQL, and grant privileges to it to manage the database using the MySQL database admin utility:

    # mysql -u root -p<
    CREATE USER $HUEUSER IDENTIFIED BY '$HUEPASSWORD';
    GRANT ALL PRIVILEGES on *.* to ‘$HUEUSER’@’localhost’ WITH GRANT OPTION;
    GRANT ALL on $HUEUSER.* to ‘$HUEUSER’@’localhost’ IDENTIFIED BY $HUEPASSWORD;
    FLUSH PRIVILEGES;

    where $HUEUSER is the Hue user name and $HUEPASSWORD is the Hue user password.

  2. Create the MySQL database for Hue:

    # mysql -u root -p

    CREATE DATABASE $DBNAME;

  3. Open the /etc/hue/conf/hue.ini file and edit the [[database]] section (modify for your MySQL setup).

    [[database]] 
    engine=mysql
    host=$DATABASEIPADDRESSORHOSTNAME
    port=$PORT
    user=$HUEUSER
    password=$HUEPASSWORD
    name=$DBNAME
  4. Synchronize Hue with the external database to create the schema and load the data:

    /usr/lib/hue/build/env/bin/hue syncdb --noinput

  5. Start Hue:

    /etc/init.d/hue start