To get the username and password for the hive, go to hive-site.xmland search for javax.jdo.option.ConnectionUserNameand javax.jdo.option.ConnectionPassword. The values for these properties are your hive name and password, respectively.
(The default values for APPboth minethe username and password can be found in hive-default.xml)
, hive-site.xml. hive-site.xml:
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hiveuser</value>
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hivepass</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hadoop</value>
</property>
. hadoop mysql . javax.jdo.option.ConnectionURL jdbc:mysql://localhost:3306/hadoop.
:
Connection con = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "hiveuser", "hivepass");
hive database name default. , !!!!