<?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: Migrate Hive Metastore from MySQL to Postgres in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127091#M89813</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Glad to be of some help. Please mark best answer to end the discussion.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jul 2016 12:28:28 GMT</pubDate>
    <dc:creator>ssubhas</dc:creator>
    <dc:date>2016-07-15T12:28:28Z</dc:date>
    <item>
      <title>Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127078#M89800</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a EMR cluster and the hive metastore is connected to MySQL RDS instance.&lt;/P&gt;&lt;P&gt;I am now moving to Hortonworks(v2.4.2 with Ambari 2.2) and with that I also wanted to move the hive metastore to Postgres RDS instance.&lt;/P&gt;&lt;P&gt;But whenever I migrate the data and try connecting the hive metastore to that schema, it throws the below error. It's working fine for the new database.&lt;/P&gt;&lt;P&gt;=================================&lt;/P&gt;&lt;P&gt;stderr: 
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 245, in &amp;lt;module&amp;gt;
    HiveMetastore().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 530, in restart
    self.start(env, upgrade_type=upgrade_type)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 58, in start
    self.configure(env)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive_metastore.py", line 72, in configure
    hive(name = 'metastore')
  File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/var/lib/ambari-agent/cache/common-services/HIVE/0.12.0.2.0/package/scripts/hive.py", line 296, in hive
    user = params.hive_user
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 238, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call
    raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-metastore/bin/schematool -initSchema -dbType postgres -userName root -passWord [PROTECTED]' returned 1. WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL: jdbc:postgresql://cirrus.c9xp5ox1vhs8.us-west-2.rds.amazonaws.com:5432/cirrus1
Metastore Connection Driver : org.postgresql.Driver
Metastore connection User: root
Starting metastore schema initialization to 1.2.1000
Initialization script hive-schema-1.2.1000.postgres.sql
Error: ERROR: relation "BUCKETING_COLS" already exists (state=42P07,code=0)
org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
*** schemaTool failed ***
 stdout:
2016-07-13 08:55:20,106 - The hadoop conf dir /usr/hdp/current/hadoop-client/conf exists, will call conf-select on it for version 2.4.2.0-258
2016-07-13 08:55:20,106 - Checking if need to create versioned conf dir /etc/hadoop/2.4.2.0-258/0&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 18:20:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127078#M89800</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-13T18:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127079#M89801</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt;&lt;P&gt;Did you try running schematool to upgrade Metastore? &lt;/P&gt;&lt;P&gt;For example:  $ /usr/hdp/current/hive-metastore/bin/schematool -upgradeSchema -dbType mysql&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sindhu&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 18:37:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127079#M89801</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-07-13T18:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127080#M89802</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But why should we run that command. I am not upgrading the metastore but migrating it from MySql to Postgres. Does this still needs to be run?&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rinku Singh&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 19:07:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127080#M89802</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-13T19:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127081#M89803</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Just to give more background. I created a new database in postgres which in turn creates a new schema called 'public' with no tables in it.&lt;/P&gt;&lt;P&gt;As soon as the connection is made by hive for the first time, it internally runs scripts and creates around 56 tables in the public schema.&lt;/P&gt;&lt;P&gt;This applies to Mysql db as well.&lt;/P&gt;&lt;P&gt;The issue comes when I have already migrated those 56 tables present in MySQL database to postgres database and then try to connect, I get the above error.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rinku Singh.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 19:18:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127081#M89803</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-13T19:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127082#M89804</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From below error, it seems like the Hive metastore is trying to run schemaTool -initSchema:&lt;/P&gt;&lt;P&gt;ERROR: relation "BUCKETING_COLS" already exists (state=42P07,code=0) org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !! *** schemaTool failed ***&lt;/P&gt;&lt;P&gt;Please run schemaTool -upgradeSchema -dbType &amp;lt;type&amp;gt; -dryRun and let me know the result.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 19:27:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127082#M89804</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-07-13T19:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127083#M89805</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt;&lt;P&gt;When you say 56 tables present in MySQL database to postgres database, to which database the tables were migrated to on postgres?&lt;/P&gt;&lt;P&gt;What is the jdbc connection URL under hive-site.xml?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 19:37:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127083#M89805</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-07-13T19:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127084#M89806</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Let me put this in much clear way. There are two databases.&lt;/P&gt;&lt;P&gt;1. I created a database called Test. I then started the Hive service and it came up properly. I then saw that 56 tables were created which were not present earlier. It's obvious that it would have run the schemaTool -initSchema command.&lt;/P&gt;&lt;P&gt;2. Later I created one more database and I copied the 56 tables from MySQL to Postgres(in the new database). Changed the database in Ambari to point to this new database and tried restarting the Hive service. Then I got this error.&lt;/P&gt;&lt;P&gt;True that the Hive metastore is trying to run schemaTool -initSchema command in second scenario as well and I want to understand what triggers it to run the schemaTool -initSchema command and how can I resolve it so that I can successfully migrate the metastore and start the Hive service.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rinku Singh.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 20:00:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127084#M89806</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-13T20:00:26Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127085#M89807</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Run the below command and share the result:&lt;/P&gt;&lt;P&gt;schematool -info -dbType postgres -userName hive -passWord hive -verbose&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 20:41:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127085#M89807</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-07-13T20:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127086#M89808</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I ran the above command and found that the database schema version is not compatible with hive version&lt;/P&gt;&lt;P&gt;==========================================&lt;/P&gt;&lt;P&gt;[rsingh01]$ ./schematool -info -dbType postgres -userName root -passWord password -verbose
WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL:        jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxx/xxxxx Metastore Connection Driver :    org.postgresql.Driver
Metastore connection User:       root
Hive distribution version:       1.2.1000
Metastore schema version:        1.2.0
org.apache.hadoop.hive.metastore.HiveMetaException: Metastore schema version is not compatible. Hive Version: 1.2.1000, Database Schema Version: 1.2.0
org.apache.hadoop.hive.metastore.HiveMetaException: Metastore schema version is not compatible. Hive Version: 1.2.1000, Database Schema Version: 1.2.0
        at org.apache.hive.beeline.HiveSchemaTool.assertCompatibleVersion(HiveSchemaTool.java:196)
        at org.apache.hive.beeline.HiveSchemaTool.showInfo(HiveSchemaTool.java:140)
        at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:501)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
*** schemaTool failed ***&lt;/P&gt;&lt;P&gt;============================================&lt;/P&gt;&lt;P&gt;I then tried upgrading the database schema version by running the below command. The dryRun is going through successfully but now I am stuck when I am doing the actual execution of the script&lt;/P&gt;&lt;P&gt;=============================================&lt;/P&gt;&lt;P&gt;[rsingh01]$ ./schematool -dbType postgres -userName root -passWord password -upgradeSchema -dryRun
WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL:        jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxx/xxxxx Metastore Connection Driver :    org.postgresql.Driver
Metastore connection User:       root
Starting upgrade metastore schema from version 1.2.0 to 1.2.1000
Upgrade script upgrade-1.2.0-to-1.2.1000.postgres.sql
schemaTool completed &lt;/P&gt;&lt;P&gt;[rsingh01]$ ./schematool -dbType postgres -userName root -passWord password -upgradeSchema
WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL:        jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxx/xxxxx Metastore Connection Driver :    org.postgresql.Driver
Metastore connection User:       root
Starting upgrade metastore schema from version 1.2.0 to 1.2.1000
Upgrade script upgrade-1.2.0-to-1.2.1000.postgres.sql
Error: ERROR: relation "compaction_queue" does not exist (state=42P01,code=0)
org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !!
*** schemaTool failed ***&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 12:28:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127086#M89808</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-14T12:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127087#M89809</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I found the reason why it says --- relation "compaction_queue" does not exist&lt;/P&gt;&lt;P&gt;In postgres, the command will not work:&lt;/P&gt;&lt;P&gt;ALTER TABLE COMPACTION_QUEUE ADD COLUMN CQ_HIGHEST_TXN_ID bigint;&lt;/P&gt;&lt;P&gt;But the below command will work:&lt;/P&gt;&lt;P&gt;ALTER TABLE "COMPACTION_QUEUE" ADD COLUMN "CQ_HIGHEST_TXN_ID" bigint;&lt;/P&gt;&lt;P&gt;The table name needs to be in double quotes. As all the upgrade scripts are written normally without double quotes, it will not work.&lt;/P&gt;&lt;P&gt;Trying to figure out a way how we can upgrade the database schema version with all these restrictions in postgres.
&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rinku Singh.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 14:29:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127087#M89809</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-14T14:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127088#M89810</link>
      <description>&lt;P&gt;Hello &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I did the following.&lt;/P&gt;&lt;P&gt;a. Created a new MySQL instance and migrated the tables into this new database&lt;/P&gt;&lt;P&gt;b. Pointed the hive metastore to the new MySQL instance. As expected, the hive metastore service didn't come up.&lt;/P&gt;&lt;P&gt;c. I ran the upgrade script command to upgrade the MySQL database schema.&lt;/P&gt;&lt;P&gt;d. I restarted the hive metastore service and it came up.&lt;/P&gt;&lt;P&gt;e. Now as the schema versions are same, I migrated the tables from the new MySQL database to Postgres database.&lt;/P&gt;&lt;P&gt;f. I am now trying to start the hiveserver2 but it is not starting but I am able to login into hive command prompt.&lt;/P&gt;&lt;P&gt;g. I also ran the following command&lt;/P&gt;&lt;P&gt;[rsingh01@ip-172-31-31-251 bin]$ ./schematool -info -dbType postgres -userName root -passWord password -verbose
WARNING: Use "yarn jar" to launch YARN applications.
Metastore connection URL:        jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxxxxx/cirrus3
Metastore Connection Driver :    org.postgresql.Driver
Metastore connection User:       root
Hive distribution version:       1.2.1000
Metastore schema version:        1.2.1000
schemaTool completed&lt;/P&gt;&lt;P&gt;h. I tried querying the tables but now it is showing the following error:&lt;/P&gt;&lt;P&gt;hive&amp;gt; select * from rms_customer;
FAILED: SemanticException Unable to determine if hdfs://xxxxxxxxxxxxxxxxxxxxxxxxxxxx:8020/user/hive/warehouse/rms.db/rms_customer is encrypted: java.lang.IllegalArgumentException: Wrong FS: hdfs://xxxxxxxxxxxxxxxxxxxxxxxxxxxx:8020/user/hive/warehouse/rms.db/rms_customer, expected: hdfs://xxxxxxxxxxxxxxxxxxxxxxxxxxxx:8020&lt;/P&gt;&lt;P&gt;h. I followed the link &lt;A href="https://issues.apache.org/jira/browse/HIVE-11116"&gt;https://issues.apache.org/jira/browse/HIVE-11116&lt;/A&gt; and tried to list the FSRoot by running the command metatool -listFSRoot but this time it is throwing the error:&lt;/P&gt;&lt;P&gt;===========================&lt;/P&gt;&lt;P&gt;[rsingh01@ip-172-31-31-251 bin]$ ./metatool -listFSRoot
WARNING: Use "yarn jar" to launch YARN applications.
Initializing HiveMetaTool..
16/07/14 10:05:43 INFO metastore.ObjectStore: ObjectStore, initialize called
16/07/14 10:05:43 INFO DataNucleus.Persistence: Property hive.metastore.integral.jdo.pushdown unknown - will be ignored
16/07/14 10:05:43 INFO DataNucleus.Persistence: Property datanucleus.cache.level2 unknown - will be ignored
16/07/14 10:05:44 ERROR Datastore.Schema: Failed initialising database.
Unable to open a test connection to the given database. JDBC url = jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxxxx/cirrus1, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
org.postgresql.util.PSQLException: FATAL: password authentication failed for user "root"&lt;/P&gt;&lt;P&gt;===========================&lt;/P&gt;&lt;P&gt;I am totally stuck now&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rinku Singh.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:17:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127088#M89810</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-14T17:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127089#M89811</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;ERROR Datastore.Schema: Failed initialising database. Unable to open a test connection to the given database. JDBC url = jdbc:postgresql://xxxxxxxxxxxxxxxxxxxxxxxx/cirrus1, username = root.&lt;/P&gt;&lt;P&gt;Seems like issue with test connectivity. Can you please try testing connectivity using a java program?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/content/kbentry/25410/simple-steps-to-test-hive-jdbc-connect.html" target="_blank"&gt;https://community.hortonworks.com/content/kbentry/25410/simple-steps-to-test-hive-jdbc-connect.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Sindhu &lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 17:51:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127089#M89811</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-07-14T17:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127090#M89812</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I finally had to add the parameter javax.jdo.option.ConnectionPassword in the hive-site.xml and re-run it. Fixed all the issues and everything is working now.&lt;/P&gt;&lt;P&gt;Thank you so much for your help and pointers.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Rinku Singh.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 12:10:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127090#M89812</guid>
      <dc:creator>rinkusingh</dc:creator>
      <dc:date>2016-07-15T12:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127091#M89813</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Glad to be of some help. Please mark best answer to end the discussion.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2016 12:28:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127091#M89813</guid>
      <dc:creator>ssubhas</dc:creator>
      <dc:date>2016-07-15T12:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127092#M89814</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11807/rinkusingh111.html" nodeid="11807"&gt;@Rinku Singh&lt;/A&gt;, &lt;A rel="user" href="https://community.cloudera.com/users/5019/ssubhas.html" nodeid="5019"&gt;@Sindhu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;We're migrating our cluster to new hardware. TBs of HDFS (/Data, /user &amp;amp; /apps/hive/warehouse) data transferred well to destination. Now, we need to move the Hive tables Metastore. There are 10s of DBs and each would have 100s of tables. The specifications are as follows:&lt;/P&gt;&lt;P&gt;Ambari: 2.5.0.3 (Old),  2.6.1.5 (New)&lt;/P&gt;&lt;P&gt;HDP:  2.6.0.3 (Old), 2.6.4.0 (New)&lt;/P&gt;&lt;P&gt;HIVE DB: MySQL (Old), Postgres (New)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt; We don't have the DBs schema so that we can run again on new cluster. It would be very tedious to Create Table from one to another. Is there a way to import the metadata dump from one to another? &lt;/P&gt;&lt;P&gt;Please advise! &lt;/P&gt;&lt;P&gt;Thanks allot in advance!&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 05:45:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127092#M89814</guid>
      <dc:creator>vikasgbiz</dc:creator>
      <dc:date>2018-05-27T05:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Migrate Hive Metastore from MySQL to Postgres</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127093#M89815</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.hortonworks.com/users/11807/rinkusingh111.html"&gt;@Rinku Singh&lt;/A&gt;, &lt;A href="https://community.hortonworks.com/users/5019/ssubhas.html"&gt;@Sindhu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;We're migrating our cluster to new hardware. TBs of HDFS (/Data, /user &amp;amp; /apps/hive/warehouse) data transferred well to destination. Now, we need to move the Hive tables Metastore. There are 10s of DBs and each would have 100s of tables. The specifications are as follows:&lt;/P&gt;&lt;P&gt;Ambari: 2.5.0.3 (Old), 2.6.1.5 (New)&lt;/P&gt;&lt;P&gt;HDP: 2.6.0.3 (Old), 2.6.4.0 (New)&lt;/P&gt;&lt;P&gt;HIVE DB: MySQL (Old), Postgres (New)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue:&lt;/STRONG&gt; We don't have the DBs schema so that we can run again on new cluster. It would be very tedious to Create Table from one to another. Is there a way to import the metadata dump from one to another?&lt;/P&gt;&lt;P&gt;Please advise!&lt;/P&gt;&lt;P&gt;Thanks allot in advance!&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 07:05:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Migrate-Hive-Metastore-from-MySQL-to-Postgres/m-p/127093#M89815</guid>
      <dc:creator>vikasgbiz</dc:creator>
      <dc:date>2018-06-05T07:05:16Z</dc:date>
    </item>
  </channel>
</rss>

