Sqoop query not working

Query 1: Getting error while running below simple sqoop query. Please let me know, if I am doing anythng wrong here.

[ssibbala78@gw01 ~]$ sqoop list-databases --connect “jdbc:msql://nn01.itversity.com/retail_db” --username retail_dba --password itversity
Warning: /usr/hdp/ does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
17/01/15 22:00:46 INFO sqoop.Sqoop: Running Sqoop version:
17/01/15 22:00:46 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
17/01/15 22:00:46 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: No manager for connect string: jdbc:msql://nn01.itversity.com/retail_db
at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:191)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:264)
at org.apache.sqoop.tool.ListDatabasesTool.run(ListDatabasesTool.java:44)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

[ssibbala78@gw01 ~]$

Query2: How to identify the hostnameon which the mysql is installed during the exam. I just did hostname on client and it gives me the gw01. but we use nn01 in the sqoop query as per the video.
[ssibbala78@gw01 ~]$ hostname -f
[ssibbala78@gw01 ~]$



Answering to Query # 1 :
Your intention is to list the database but the sqoop command has the database name itself “retail_db”. So obviously it will fails. But still it work to list-tables and not for list-databases.

I never attended the CCA175 so I am not sure about that.

But as per CDH Quickstart VM if you refer the connection string like jdbc:mysql://${hostname}:3306 should help.

to find out the mysql hostname please execute the SQL show variables; and look for the value of the variable “hostname”.

Thanks. I realised my mistake. Now it is working fine.