How to get the hostname and portnumber in CCA examination

Hi Guys,

My question is regarding sqoop import. How can we find the host name and port number of on which our mysql server will be running in CCA spark and hadoop certification. In our cloudera distribution in our laptop we have a single node and hence we are using localhost. Will they provide the host name and portnumber seperately or we have to find it.

Regards,
Bunty

hostname -f
should give you the hostname

for port

Login into MYSQL. Enter following command

  1. Show Variables : It will display all the variable list where you can search for port variable. OR
  2. Show Variables Where Variable_name = ‘port’ : It will display the information related to port.
    ±--------------------±--------+
    | Variable_name | Value |
    ±--------------------±--------+
    | port | 3306 |
    ±--------------------±--------+
    1 row in set (0.00 sec)
2 Likes

Thanks Avinash,

Regards,
Bunty

Yes… They will provide a gateway node. And using gateway node you can connect to DB using
mysql -u username -p -h cloudera_host

1 Like