天天看點

sqoop元件運作出錯問題解決--com.mysql.jdbc.Driver

sqoop list-tables --connect jdbc:mysql://192.168.11.94:3306/huochetoudalian --username xxx -password xxx

Warning: /opt/cloudera/parcels/CDH-5.0.2-1.cdh5.0.2.p0.13/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.

Please set $ACCUMULO_HOME to the root of your Accumulo installation.

15/04/17 12:24:40 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4-cdh5.0.2

15/04/17 12:24:40 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.

15/04/17 12:24:40 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

15/04/17 12:24:40 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver

java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver

at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:797)

at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)

at org.apache.sqoop.manager.CatalogQueryManager.listTables(CatalogQueryManager.java:102)

at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)

at org.apache.sqoop.Sqoop.run(Sqoop.java:147)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)

at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)

at org.apache.sqoop.Sqoop.main(Sqoop.java:240)

~~~~~~~~~~~~~~~~

安裝com.mysql.jdbc.Driver吧。。

CDH裡是這樣操作的。: