ssh 111.229.25.127 The authenticity of host '111.229.25.127 (111.229.25.127)' can't be established. ECDSA key fingerprint is SHA256:1OLYAxTlNkqPEPqX4n2Pvcg8hBzYbqD+UOfVTseEMYo. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. -->
<!-- Put site-specific property overrides in this file. -->
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. -->
<!-- Put site-specific property overrides in this file. -->
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>javax.jdo.option.ConnectionURL</name> <value>jdbc:mysql://111.229.25.127:3306/hive?createDatabaseIfNotExist=true&useSSL=false</value> <description>JDBC connect string for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionDriverName</name> <value>com.mysql.cj.jdbc.Driver</value> <description>Driver class name for a JDBC metastore</description> </property> <property> <name>javax.jdo.option.ConnectionUserName</name> <value>root</value> <description>username to use against metastore database</description> </property> <property> <name>javax.jdo.option.ConnectionPassword</name> <value>wqeq</value> <description>password to use against metastore database</description> </property> <property> <name>hive.security.authorization.enabled</name> <value>true</value> </property> <property> <name>hive.server2.thrift.bind.host</name> <value>172.26.160.119</value><!-- 服务器的 IP 地址 --> </property> <property> <name>hive.server2.thrift.port</name> <value>10000</value> </property> <property> <name>hive.server2.enable.doAs</name> <value>true</value> </property> <property> <name>hive.server2.enable.impersonation</name> <value>true</value> </property> </configuration>
设置mysql【可选】
1 2 3 4 5 6 7 8
create database hive; #用户hive的密码是hive CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive'; #授权,将所有数据库的所有表的所有权限赋给hive用户,后面的hive是配置hive-site.xml中配置的连接密码 GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost'; #刷新mysql系统权限关系表 FLUSH PRIVILEGES;