Get list of mysql databases in same line

This will skip mysql,performance_schema, information_schema databases.

mysql> SELECT GROUP_CONCAT(schema_name SEPARATOR ' ') \
FROM information_schema.schemata WHERE schema_name \
NOT IN ('mysql','performance_schema','information_schema');

Get list of mysql databases in same line