<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to move Hue Database from default Sqlite database to MySQL/Postgres? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94424#M7718</link>
    <description>&lt;P&gt;I followed above procedure to migrate sqlite3 db to external mysql database. However i got below error.&lt;/P&gt;&lt;P&gt;CommandError: Unable to serialize database: (1146, "Table 'hue.django_openid_auth_nonce' doesn't exist")&lt;/P&gt;&lt;P&gt;Please help me to resolve this error.&lt;/P&gt;</description>
    <pubDate>Thu, 17 May 2018 20:13:20 GMT</pubDate>
    <dc:creator>yograjshinde</dc:creator>
    <dc:date>2018-05-17T20:13:20Z</dc:date>
    <item>
      <title>How to move Hue Database from default Sqlite database to MySQL/Postgres?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94420#M7714</link>
      <description />
      <pubDate>Tue, 21 Apr 2026 13:57:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94420#M7714</guid>
      <dc:creator>pardeep_kumar</dc:creator>
      <dc:date>2026-04-21T13:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to move Hue Database from default Sqlite database to MySQL/Postgres?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94421#M7715</link>
      <description>&lt;P&gt;Here is instruction for moving Hue from Sqlite to MySQL and same can be changed to work with Postgres. Self posting the answer after test.&lt;/P&gt;&lt;P&gt;Create a new user in MySQL, and grant privileges to it to manage the database using the MySQL database admin utility.&lt;/P&gt;&lt;PRE&gt;# 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;&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;Create the MySQL database for Hue.&lt;/P&gt;&lt;PRE&gt;# mysql -u root -pCREATE DATABASE $DBNAME;&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;Stop Hue if it is running.&lt;/P&gt;&lt;PRE&gt;/etc/init.d/hue stop&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;To migrate your existing data to MySQL, use the following command to dump the existing database data to a text file. Note that using the “.json” extension is required.&lt;/P&gt;&lt;PRE&gt;/usr/lib/hue/build/env/bin/hue dumpdata &amp;gt; /tmp/hue_db_dump.json&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;Open the /etc/hue/conf/hue.ini file and edit the [[database]] section (modify for your MySQL setup).&lt;/P&gt;&lt;PRE&gt;[[database]] 

engine=mysql

host=$DATABASEIPADDRESSORHOSTNAME

port=$PORT

user=$HUEUSER

password=$HUEPASSWORD

name=$DBNAME&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;As the Hue user, configure Hue to load the existing data and create the necessary database tables.&lt;/P&gt;&lt;PRE&gt;/usr/lib/hue/build/env/bin/hue syncdb --noinput

/usr/lib/hue/build/env/bin/hue migrate

/usr/lib/hue/build/env/bin/hue loaddata /tmp/hue_db_dump.json&lt;/PRE&gt;&lt;OL&gt;
&lt;/OL&gt;&lt;P&gt;Your system is now configured and you can start the Hue server as normal.&lt;/P&gt;&lt;PRE&gt;/etc/init.d/hue start&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2015 10:20:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94421#M7715</guid>
      <dc:creator>pardeep_kumar</dc:creator>
      <dc:date>2015-09-29T10:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to move Hue Database from default Sqlite database to MySQL/Postgres?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94422#M7716</link>
      <description>&lt;P&gt;At this time it's good to upgrade South if you are not already running 0.8 - as databases created in MySQL with 0.7 can have issues with upgrades -- do the following before the above.&lt;/P&gt;&lt;P&gt;# su - hue&lt;/P&gt;&lt;P&gt;# cd /usr/lib/hue&lt;/P&gt;&lt;P&gt;# source ./build/env/bin/activate&lt;/P&gt;&lt;P&gt;# pip install --upgrade South==0.8.2&lt;/P&gt;&lt;P&gt;# deactivate &lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 00:28:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94422#M7716</guid>
      <dc:creator>dgoodhand</dc:creator>
      <dc:date>2015-11-24T00:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to move Hue Database from default Sqlite database to MySQL/Postgres?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94424#M7718</link>
      <description>&lt;P&gt;I followed above procedure to migrate sqlite3 db to external mysql database. However i got below error.&lt;/P&gt;&lt;P&gt;CommandError: Unable to serialize database: (1146, "Table 'hue.django_openid_auth_nonce' doesn't exist")&lt;/P&gt;&lt;P&gt;Please help me to resolve this error.&lt;/P&gt;</description>
      <pubDate>Thu, 17 May 2018 20:13:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-move-Hue-Database-from-default-Sqlite-database-to/m-p/94424#M7718</guid>
      <dc:creator>yograjshinde</dc:creator>
      <dc:date>2018-05-17T20:13:20Z</dc:date>
    </item>
  </channel>
</rss>

