In continuation to my posts on the Market basket analysis, I would continue my next steps towards the analytics using the data available in the FoodMart Dataset which you can download from this url https://sites.google.com/a/dlpage.phi-integration.com/pentaho/mondrian/mysql-foodmart-database. Before moving on to next steps its important that we understand certain things with respect to connecting to mysql from Sqoop as we are focusing on big data as retail is always big. Here are the steps..
- Please download the JDBC driver for Sqoop to interact with MySQL using the following URL : http://dev.mysql.com/downloads/connector/j/
- Make sure you downloaded the mysql-connector-java-5.1.25.tar.gz either using wget or you can download it from your windows machine if your connected with VirtualBox or VMWare.
- Then extract the files to get the mysql-connector-java-5.1.25-bin.jar file and place under sqoop/lib folder
- Make sure you have the necessary mysql server information like hostname, username and password with necessary access.
- Once you have got that make you have provided necessary privileges for other host to access the mysql server using the following statement:
grant all privileges on *.* to ‘username’@’%’ identified by ‘userpassword’;
- Then you can get the list of tables from the mysql database foodmart using the following command:
sqoop list-tables –connect jdbc:mysql://192.168.1.32:3306/foodmart -username root
Note: I have done this experiment with Sqoop version 1.4.3, Ubuntu 12.0.4 LTS on Virtualbox and mysql 5.5.24 with WAMP.

Caution: In my example I have used root as the username please don’t use the root username.
Other Links for your references:
http://www.devx.com/Java/hadoop-sqoop-to-import-data-from-mysql.html
http://www.datastax.com/docs/datastax_enterprise2.0/sqoop/sqoop_demo