Here is a quick mysql script to drop all databases except test and information schema :
Go to mysql command-line and execute this :
1 | select group_concat(concat(‘drop database `’,SCHEMA_NAME,’`;’) SEPARATOR ‘ ‘ ) from information_schema.schemata where SCHEMA_NAME !=’mysql’ and SCHEMA_NAME !=’information_schema’; |