List databases (schemas) on MariaDB instance

The query below lists databases (schemas) on MariaDB instance.


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;


  • schema_name - database (schema) name


  • 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).

There are no comments. Click here to write the first comment.