报错背景:
CDH安装完成Sqoop2的组建后进行创建link的操作。
报错现象:
There are issues with entered data, please revise your input: Name: mysql_link Link configuration Error message: Class not found JDBC Driver Class: com.mysql.jdbc.Driver JDBC Connection String: jdbc:mysql://master:3306/app Username: root Password: **** JDBC Connection Properties: There are currently 1 values in the map: protocol = tcp entry#
报错原因:
报错解释:未找到JDBC驱动程序类
1.”com.mysql.jdbc.Driver“这几个字母拼写错误;
2.未将jdbc驱动放入指定目录:/var/lib/sqoop2
我的错误是第二种。
报错解决:
将/mysql-connector-java-5.1.47驱动复制到/var/lib/sqoop2目录下
cp mysql-connector-java-5.1.47.jar /var/lib/sqoop2
然后更改其所属用户和所属组
chown sqoop2:sqoop2 mysql-connector-java-5.1.47.jar
重启Sqoop2服务!!!(这一步一定要做)
报错消失 。