How to check if MySQL database exists - MySQL Developer Tutorial

How to check if MySQL database exists

You can use below query to check if the database / schema exits in MySQL


Select schema_name from information_schema.schemata
where schema_name='YourDatabaseName';


or you can use below.


show databases like '%YourDBName%';



Check if MySQL Database exists | How to check if database exists in MairaDB

1 comment: