Using Hue with MySQL
To set up Hue to use a MySQL database:
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.
Create the MySQL database for Hue:
# mysql -u root -p
CREATE DATABASE $DBNAME;
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
Synchronize Hue with the external database to create the schema and load the data:
/usr/lib/hue/build/env/bin/hue syncdb --noinput
Start Hue:
/etc/init.d/hue start