I have a general idea of how to test to see if a database exists with SQL Server.

Is there an equivalent with MySQL? How close is the syntax?

Select 1 from Information_Schema.Schemata where catalog_name='mydatabase'