Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Beeline connection string with a password which includes a space

avatar
New Contributor

I am unable to connect to Hive using a Beeline connection string when the password contains a space. Can somebody please help me. I've tried this:

 

beeline -u 'jdbc:hive2://server.com:10200/default;user=bob;password=is your uncle'

 

But it doesn't work. I've also tried putting a backslash in front of the spaces and using double quote to no avail.

 

Regards.

3 REPLIES 3

avatar
Master Collaborator

@Glive  I couldn't test it right now, but could you try the following?

 

beeline -u "jdbc:hive2://server.com:10200/default;user=bob;password='is your uncle'"

 

Within single quotes try to escape white space with a back slash(\), if it does not work.

Else, let beeline prompt you for the password:

 

beeline -u "jdbc:hive2://server.com:10200/default" -n bob -p

 

When it prompts you, enter the password. This was introduced in HIVE-13589

avatar
Contributor

Try putting your password in backtick ` ` (key above tab key)

avatar
New Contributor

I wasn't able to make it work so simply changed my password and removed the spaces.