Sqoop List-Databases Command With Example


Sqoop List-Databases Command With Example

This post describes how to list out the databases using Sqoop. Sqoop list-databases tool parses and executes the 'SHOW DATABASES' query against the database server. Thereafter, it lists out the present databases on the server.

Step 1 - Change the directory to /usr/local/hadoop/sbin




$ cd /usr/local/hadoop/sbin

Step 2 - Start all hadoop daemons.




$ start-all.sh

Step 3 - The JPS (Java Virtual Machine Process Status Tool) tool is limited to reporting information on JVMs for which it has the access permissions.




$ jps

Step 4 - Change the directory to /usr/local/sqoop/bin




$ cd /usr/local/sqoop/bin

LIST-DATABASES

The following command is used to list all the databases in the MySQL database server.




$ sqoop list-databases \
--connect jdbc:mysql://localhost/ \
--username root \
--password root 




Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *