The query below lists user databases (schemas) on MySQL instance.
Query
select schema_name as database_name
from information_schema.schemata
where schema_name not in('mysql','information_schema',
'performance_schema','sys')
order by schema_name;
Columns
- database_name - database (schema) name
Rows
- One row: represents one database (schema)
- Scope of rows: all databases (schemas) on MySQL instance excluding system ones
- Ordered by: database (schema) name
Sample results
Below is the sample results generated by query