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;
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:[[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.
cd /usr/lib/hue source build/env/bin/activate hue syncdb --noinput Hue migrate deactivate