注:有风险需谨慎仔细查看导出表
上述 phabricator_开头的都不是我想要的需要筛选出来到文件中 /tmp/table.txt
1. 执行sql语句 mysql> select concat('drop database ',TABLE_SCHEMA,';') from( select distinct TABLE_SCHEMA FROM information_schema.tables WHERE TABLE_SCHEMA LIKE 'phabricator_%' )t INTO OUTFILE '/tmp/table.txt';
2.如果碰到ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement,然后在MySQL配置文件里面[mysqld] 加入 secure-file-priv = ""
3.确认删除是否是自己想要删除的
4. mysql> source /tmp/table.txt;