使用Sqoop从MySQL导入数据 - 错误:没有连接字符串管理器

时间:2016-07-10 12:04:57

标签: mysql sqoop

[training@localhost ~]$ sqoop import-all-tables --connect "jbdc:mysql://localhost/training" --username training -P -m 1
Enter password: 
16/07/10 08:01:45 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: No manager for connect string: jbdc:mysql://localhost/training
    at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:119)
    at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:200)
    at org.apache.sqoop.tool.ImportTool.init(ImportTool.java:83)
    at org.apache.sqoop.tool.ImportAllTablesTool.run(ImportAllTablesTool.java:48)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
    at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)

1 个答案:

答案 0 :(得分:1)

您的语法错误,您必须使用:

sqoop import-all-tables --connect "jdbc:mysql://localhost/training" --username training -P -m 1

您写的 jbdc 而不是 jdbc