Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

SQOOP - MYSQL - Practice test 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

Everything is configured perfectly fine on the real exam for Sqoop to work. It's also configured correctly on the practice exam. If you are having trouble getting the command to work, the solution is in the /home/horton/solutions folder on the Ubuntu instance. Try running the solution. If that fails, please share the error and I can help you from there.

View solution in original post

17 REPLIES 17

avatar
Master Guru

@Vidya SK

Run below command to list the tables:

sqoop list-tables --connect jdbc:mysql://<mysql-server>/database --username <username> --password <password>

avatar
Rising Star

what is the value for <MySQL-server> on practice instance?

avatar
Guru

The server name is namenode

avatar
Rising Star

@Kuldeep Kulkarni

what is the value for <MySQL-server> on practice instance?

avatar
Master Guru

@Vidya SK - Goto Ambari UI -> select Hive service -> you should see mysql server there -> just point your mouse arrow over the link and you should get the name of mysql server

OR

you will get it in hive-site.xml

grep -A 2 mysql /etc/hive/conf/hive-site.xml

avatar
Rising Star

@Kuldeep Kulkarni

Thanks Kuldeep.

With the above grep command, I got the following:

1227-mysql.jpg

Sqoop Command:

1228-sqoop-cmd.jpg

I am getting following error. Please suggest.

1229-error.jpg

avatar
Master Guru

@Vidya SK - you are getting access denied exception that means user root does not have access to mysql DB using password 'hadoop'. please check your password and try again with valid username and password

avatar
Master Mentor

Just reset the root password I had to reset the MySQL password to do so follow the below process.Start the DB if its down

[root@sandbox]# service mysqld start

Starting mysqld: [ OK ]

Reset the MySQL password

[root@sandbox]# mysqladmin -u root -h sandbox.hortonworks.com password 'newpassword'

[root@sandbox]# mysqladmin -u root password 'newpassword'

Try out the new password and it seems to work out well

[root@sandbox]# mysql -u root -p

Enter password:

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 6

Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select user();

After validating the successful logon retry

avatar
Master Mentor

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