SHOW DATABASES lists databases in your current cluster or an external data source.
SHOW DATABASES lists databases in your current cluster or an external data source. The database supports viewing databases of an external data source from v2.3 onwards.
Syntax
SHOW DATABASES [FROM <catalog_name>]
Parameters
Parameter
Required
Description
catalog_name
No
The name of the internal catalog or an external catalog.
If you do not specify the parameter or specify the name of the internal catalog, which is default_catalog, you can view databases in your current cluster.
If you set the value of the parameter to the name of an external catalog, you can view databases in the corresponding external data source. You can run SHOW CATALOGS to view internal and external catalogs.
Examples
Example 1: View databases in your current cluster.
SHOW DATABASES;
Or
SHOW DATABASES FROM default_catalog;
The output of the preceding statements is as follows.