Put the following into a file called get_table_names.sql :
Mysql names the output column "tables_in_[database_name]".
Then execute at the shell command prompt:
Then edit the file table_list to make each line a drop table commandt:
use db;
show tables where tables_in_db like 'myPrefix_%';
Replace "db" with your database name in both lines of the file.show tables where tables_in_db like 'myPrefix_%';
Mysql names the output column "tables_in_[database_name]".
Then execute at the shell command prompt:
mysql -u dbuser -p < get_table_names.sql > table_list
Then edit the file table_list to make each line a drop table commandt:
drop table myPrefix_1;
drop table myPrefix_2;
Now execute the MySQL commands in file table_list:drop table myPrefix_2;
mysql -u dbuser -p db <table_list