The query below lists databases (schemas) on MariaDB instance.
Query
A. Generic query
select schema_name as database_name
from information_schema.schemata
order by schema_name;
B. Show statement (option 1)
show databases;
C. Show statement (option 2)
show schemas;
Columns
- schema_name - database (schema) name
Rows
- One row: represents one database (schema)
- Scope of rows: all databases (schemas) on MariaDB instance
- Ordered by: database (schema) name
Sample results
Below is the sample results generated by Generic query (option A).
View of databases (schemas) in MySQL Workbench connected to a MariaDB Server. Blue rectangle selects system databases (schemas).