I want to drop all the databases starting with a word.
abc xyz cms_db1 cms_db2 cms_xyz pqr
In the example given above, I will like to drop all
Here's a pure mySQL solution in two queries:
SELECT CONCAT('DROP DATABASE `', SCHEMA_NAME, '`;') FROM `information_schema`.`SCHEMATA` WHERE SCHEMA_NAME LIKE 'cms_%';
Then copy and paste the resulting recordset and run