Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here. Want to know more about what has changed? Check out the Community News blog.

Not able to connect to non-default database through beeline

Not able to connect to non-default database through beeline

Contributor

Hi,

 

I want to connect to non-default database through beeline, so I am using command like below

beeline -u jdbc:hive2://hostname:port/info_DB -n devusr -e "show tables" , but ti is showing the table details of default database only.

 

Kindly suggest.

 

Thanks,

 

3 REPLIES 3

Re: Not able to connect to non-default database through beeline

Guru
I have tested, it is working for me.

What version of CDH/Hive are you using?

Can you please add quotes to the jdbc connection string? Like below:

beeline -u 'jdbc:hive2://hostname:port/info_DB' -n devusr -e "show tables"

Re: Not able to connect to non-default database through beeline

Contributor
@EricL,

After adding quotes, it is working now

Thanks,
Priya
Highlighted

Re: Not able to connect to non-default database through beeline

Guru
Nice, thanks for letting me know and glad that is has been resolved.

Cheers