I was trying to do sqoop export by exporting my hive table to mysql.In order to do so , I created a table called retail_export.cat_sujith and ran the below sqoop command. However it fails because the username and password for this belongs to retail_dba and does not seem to be able to connect to sqoop_export.
The command fails with the error Table ‘retail_db.retail_export.cat_sujith’ doesn’t exist
sqoop export --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username=retail_dba --password=itversity --table retail_export.cat_sujith --export-dir=/apps/hive/warehouse/sujith_hive_import.db/categories -m 2 --batch
Subsequently i removed the database name retail_export from the sqoop command and it failed with the error Table ‘retail_db.cat_sujith’ doesn’t exist.
mysql> select * from retail_export.cat_sujith;
Empty set (0.00 sec)
As you can see above ,the table retail_export.cat_sujith does exist , show I be using a different username password to be able to connect to the retail_export.cat_sujith and export the data
Please advice as to how to get the sqoop export to recognize the schema and table