List user created databases (schemas) in MySQL

The query below lists user databases (schemas) on MySQL instance.


select schema_name as database_name
from information_schema.schemata
where schema_name not in('mysql','information_schema',
order by schema_name;


  • database_name - database (schema) name


  • 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

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
There are no comments. Click here to write the first comment.