Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 978F0602B for ; Fri, 3 Jun 2011 23:59:23 +0000 (UTC) Received: (qmail 92286 invoked by uid 500); 3 Jun 2011 23:59:22 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 92248 invoked by uid 500); 3 Jun 2011 23:59:22 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 92240 invoked by uid 99); 3 Jun 2011 23:59:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 23:59:22 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,URI_NOVOWEL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sanjeev.sagar@gmail.com designates 209.85.161.48 as permitted sender) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 23:59:16 +0000 Received: by fxm7 with SMTP id 7so2841513fxm.35 for ; Fri, 03 Jun 2011 16:58:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=p8KT/wkXtpjDn6TtaEtCBYAr+v8l7JRU+ArkX1PTP8U=; b=BNTdoVAzrRSlYqvLHnPOBMBoYQBEKq/PpT6ZqIY1lTx5/6rPWMdG7mquC08fH5giOc qgxJ+GFZfL50gZXBh/DPQRpTKfxRU2Kv25BYdSHRWWxiXV5+KizOt6yaoy7dm5uUWBXn c7Ll3csDDSev9KAznBtCbOA3wONiY5Qf1JR+g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=AteEKmeLt3lGpKJL/iQkHKR7nCV7mZGhLtMQJEDqpmu+BtHn8f4YVrxgv5PvxLe4fS 1X5AQQz3y+oNM3pghZe/d1gWGG62Fj1Exl7RMFm191XWg3ZuLiHHxq4+HpC0maVpGCTm QJXGTHWHVR5IdT+hRWxJ3tE1n2QeCfdPrd/R8= MIME-Version: 1.0 Received: by 10.223.92.154 with SMTP id r26mr281232fam.35.1307145536067; Fri, 03 Jun 2011 16:58:56 -0700 (PDT) Received: by 10.223.103.10 with HTTP; Fri, 3 Jun 2011 16:58:56 -0700 (PDT) In-Reply-To: <18442.8220.qm@web110504.mail.gq1.yahoo.com> References: <18442.8220.qm@web110504.mail.gq1.yahoo.com> Date: Fri, 3 Jun 2011 16:58:56 -0700 Message-ID: Subject: Re: changing metastore of Hive to MySQL problem From: sanjeev sagar To: user@hive.apache.org, Ayon Sinha Content-Type: multipart/alternative; boundary=00151747ba9658d8ad04a4d7894d X-Virus-Checked: Checked by ClamAV on apache.org --00151747ba9658d8ad04a4d7894d Content-Type: text/plain; charset=ISO-8859-1 This is your mysql id issue. I'm guessing that your id '*APP*'@'*dwdb002*. internal.xxxxxxx.com' domain is not same like you do in mysql user table. Try this: show grants for '*APP*'@'*dwdb002*.internal.xxxxxxx.com' and this will tell you if you've defined it right. Meanwhile you can have a separate hive id like hive@'%' in your mysql for testing. And you can mention id and pswd in the hive-site.xml file. -Sanjeev On Fri, Jun 3, 2011 at 4:52 PM, Ayon Sinha wrote: > Hi, > I am trying to change the metastore from Derby to Mysql and following the > directions. > We changed the hive-site.xml to point to the right jdbc connection URL. The > jars are available in the classpath. It seems to pick up the local box's > hostname and try default username and password. > Neither the XML change nor the command line arg is affecting it. > > I have this in xml file > > javax.jdo.option.ConnectionDriverName > com.mysql.jdbc.Driver > Driver class name for a JDBC metastore > > > > hive.metastore.local > true > > > > javax.jdo.option.ConnectionURL > jdbc:mysql://*internaldb001*.internal.xxxxx.com/hive_metastore > > > > > javax.job.option.ConnectionUserName > app > > > > javax.jdo.option.ConnectionPassword > xxxxxxxx > > > > > hive -hiveconf javax.jdo.option.ConnectionURL=jdbc:mysql://*internaldb001 > */hive_metastore -e "show tables" > Hive history file=/tmp/ayon/hive_job_log_ayon_201106032335_873482984.txt > FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Access > denied for user '*APP*'@'*dwdb002*.internal.xxxxxxx.com' (using password: > YES) > NestedThrowables: > java.sql.SQLException: Access denied for user 'APP'@' > dwdb002.internal.shopkick.com' (using password: YES) > FAILED: Execution Error, return code 1 from > org.apache.hadoop.hive.ql.exec.DDLTask > > -Ayon > See My Photos on Flickr > Also check out my Blog for answers to commonly asked questions. > > > -- Sanjeev Sagar --00151747ba9658d8ad04a4d7894d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is your mysql id issue. I'm guessing that your id=A0&#= 39;APP'@'dwdb002.internal.xxxxxxx.com'=A0 domain is not same = like you do in mysql user table.=A0

=
Try this: show grants for 'APP'@'dwdb00= 2.internal.x= xxxxxx.com'=A0 and this will tell you if you've defined it righ= t.

Meanwhile you can have a separate hive id like hive@'= ;%' in your mysql for testing. And you can mention id and pswd in the h= ive-site.xml file.

-Sanjeev

On Fri= , Jun 3, 2011 at 4:52 PM, Ayon Sinha <ayonsinha@yahoo.com> wrote:
Hi,
I am trying to change the metastore from Derby to M= ysql and following the directions.
We changed the hive-site.xml to point to the right jdbc connection UR= L. The jars are available in the classpath. It seems to pick up the local b= ox's hostname and try default username and password.
=A0Neither the XML change nor the command line arg is affecting it.= =A0

I have this in xml file
= <property>
=A0 <name>javax.jd= o.option.ConnectionDriverName</name>
=A0 <value>com.mysql.jdbc.Driver</value>
=A0 <description>Driver class name for a JDBC m= etastore</description>
</propert= y>

<property>
=A0 <name>hive.metastore.local</name>
=A0 <value>true</value>
</pro= perty>

<property>
=A0 <name>= javax.jdo.option.ConnectionURL</name>
=A0 <value>jdbc:mysql://internaldb001.intern= al.xxxxx.com/hive_metastore</value>
</property>

<property&g= t;
=A0 <name>javax.job.option.Conne= ctionUserName</name>
=A0 <value>app</value>
</prop= erty>

<property>
=A0 <name>j= avax.jdo.option.ConnectionPassword</name>
=A0 <value>xxxxxxxx</value>
<= div></property>



= hive -hiveconf =A0javax.jdo.option.ConnectionURL=3Djdbc:mysql://internaldb001/hive= _metastore -e "show tables"
Hive history file=3D/tmp/ay= on/hive_job_log_ayon_201106032335_873482984.txt
FAILED: Error in = metadata: javax.jdo.JDOFatalDataStoreException: Access denied for user '= ;APP'@'dwdb002.internal.xxxxxxx.com' (using password: YES)
NestedThrowables:
java.sql.SQLException: Access denied for u= ser 'APP'@'dwdb002.internal.shopkick.com' (using password: YES)=
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.= exec.DDLTask
=A0



--
Sanje= ev Sagar
--00151747ba9658d8ad04a4d7894d--