Apache Sqoop List Databases

Apache Sqoop List Databases tool is used to show the list of databases present in an RDBMS. It executes the "SHOW DATABASES" command in the background to list out databases.

Apache Sqoop List Databases Syntax

Below is the syntax mentioned for Sqoop List Databases.

sqoop list-databases (gen-aruguments) (list-databases-aruguments)


Apache Sqoop List Databases Example

We will use the (list-databases) tool to list all databases present in MySQL.

Command:

cloudduggu@ubuntu:~/sqoop/bin$ sqoop list-databases --connect jdbc:mysql://localhost/?serverTimezone=UTC --username root --password cloudduggu

Output:

From the output, we can see all databases are listed.

sqoop list database