【发布时间】:2018-10-09 15:36:06
【问题描述】:
我在数据库mytestdb 中创建了一个名为employees 的简单表
我想将此表导入 hdfs。
bin/sqoop import --connect 'jdbc:postgresql://127.0.0.1/mytestdb' --username user -P --table employees --target-dir /user/postgres
但是,我一直收到错误消息:
警告:连接到 127.0.0.1:5432 时发生 SQLException org.postgresql.util.PSQLException:致命:身份验证失败 对于用户“用户” org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:473)
/var/lib/pgsql/data/pg_hba.conf设置如下:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 ident
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
【问题讨论】:
标签: postgresql centos centos7 sqoop