您的位置:首页 > 运维架构

sqoop1.99.3操作,导入数据全纪录

2016-08-27 17:44 465 查看
sqoop的1.99.7版本有问题,请千万不要用

需求:将hive数据库中的TBLS表导出到HDFS之上;
$SQOOP2_HOME/bin/sqoop.sh client
sqoop:000> set server --host 127.0.0.1 --port 12000 --webapp sqoop
创建connection:sqoop:000> create connection --cid 1
Creating connection for connector with id 1
Please fill following values to create new connection object
Name: TBLS_IMPORT_DEMO
Connection configuration
JDBC Driver Class: com.mysql.jdbc.Driver
JDBC Connection String: jdbc:mysql://127.0.0.1:3306/hive
Username: root
Password: ****
JDBC Connection Properties:
There are currently 0 values in the map:
entry#
Security related configuration options
Max connections: 10
New connection was successfully created with validation status FINE and persistent id 10

结果遇到了一个问题就是始终提醒找不到对应的驱动
就是下面的这个死提示哈
Connection configuration Warning message: Can't connect to the database with given credentials: No suitable driver found for jdbc:mysql://127.0.0.1:3306/forError message: Can't load specified driver

最后在将mysql-connector-java-5.1.39-bin.jar放到sqoop的lib目录、server/lib目录、还有/opt/sqoop-1.99.3/server/webapps/sqoop/WEB-INF/lib目录下

重启服务

终于连接上了
New connection was successfully created with validation status FINE and persistent id 1
是不是折磨人的有木有
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  mysql hadoop sqoop