Support Questions

Find answers, ask questions, and share your expertise

SQOOP - MySQL - AWS Practice Instance

avatar
Rising Star

I am working on HDPCD practice test instance. Can anybody let me know -

a) Is there anything I should do before issue sqoop command on AWS practice instance.

b) what is the parameter I should use for --connect jdbc:?????

1 ACCEPTED SOLUTION

avatar
Guru
@Vidya SK

The connection URL for the practice exam is:

--connect jdbc:mysql://namenode/flightinfo

There is nothing special you need to do prior to running the Sqoop command. The environment is configured properly for Sqoop to connect to MySQL. The entire working Sqoop command can be found in the /home/horton/solutions/ folder.

View solution in original post

12 REPLIES 12

avatar
Master Mentor
@Vidya SK

The exam is based on the Hortonworks Data Platform 2.2 installed and managed with Ambari 1.7.0, which includes Pig 0.14.0, Hive 0.14.0, Sqoop 1.4.5, and Flume 1.5.0. Each candidate will be given access to an HDP 2.2 cluster along with a list of tasks to be performed on that cluster.

you will be using localhost or hostname for --connect jdbc:host

avatar
Expert Contributor

where can i find the sample questions?

avatar
Master Mentor

@rich @Vidya SK are you still having issues with this? Can you accept best answer or provide your own solution?

avatar
Guru
@Vidya SK

The connection URL for the practice exam is:

--connect jdbc:mysql://namenode/flightinfo

There is nothing special you need to do prior to running the Sqoop command. The environment is configured properly for Sqoop to connect to MySQL. The entire working Sqoop command can be found in the /home/horton/solutions/ folder.

avatar
Contributor

Hi Rich - the practice instance MYSQL seems to have issues.

When I launch mysql it gives an error - Error 2002 - Cannot Connect to MYSQL Server through Socket /var/run/mysqld/mysqld.com

I tried ssh into root@namenode

I am able to launch mysql from there. Can you please help ?

avatar
Guru

MySQL works fine on the practice exam. It is not running on the Ubuntu client - mysqld is running on the namenode server, so if you want to view the databases and tables in MySQL then you must ssh onto the namenode:

$ ssh root@namenode (password is hadoop)
# mysql --user=root --password=hadoop

Let me know if that answers your question.

avatar
Contributor

Thanks Rich for the prompt response. The issue i have is once i login to root , all the hdfs folders do not have access. So when i run Sqoop export as root it fails on hdfs side. Alternatively i have do a chmod 777 on the hdfs directories so that sqoop run as root can get into it. Is that the intended way to do it?

avatar
Guru

You do not run the Sqoop command as root on the namenode. Run the Sqoop command as the "horton" user on the Ubuntu client.

avatar
Contributor

Hi Rich - That is the issue. When i run as horton mysql doesnt work. it only works under root. The error is Error 2002 - Cannot Connect to MYSQL Server through Socket /var/run/mysqld/mysqld.com