English 中文(简体)
Sqoop - List Databases
  • 时间:2024-11-03

Sqoop - List Databases


Previous Page Next Page  

This chapter describes how to pst out the databases using Sqoop. Sqoop pst-databases tool parses and executes the ‘SHOW DATABASES’ query against the database server. Thereafter, it psts out the present databases on the server.

Syntax

The following syntax is used for Sqoop pst-databases command.

$ sqoop pst-databases (generic-args) (pst-databases-args) 
$ sqoop-pst-databases (generic-args) (pst-databases-args)

Sample Query

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

$ sqoop pst-databases 
--connect jdbc:mysql://localhost/ 
--username root

If the command executes successfully, then it will display the pst of databases in your MySQL database server as follows.

...
13/05/31 16:45:58 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.

mysql
test
userdb
db
Advertisements