Can I consolidate multiple MYSQL databases into one database via a script? I'm using MYSQL 5.7.19 on an ubuntu server. 
Say I have 3 databases (db_1,db_2,db_3) and I create an empty database called all_db

Is there a way to copy my databases to all_db where db_1,db_2,and db_3 fall under all_db with the format of all_db.db_1_tablename1,all_db.db_2_tablename1, etc?
I found a solution to my problem. 
I wrote a select statement from the information_schema database that pulls all of the databases and their tables. I then ran these commands via CLI. 

select concat('alter table ', table_schema, '.', table_name, ' rename NEWDB.', table_schema, '_', table_name, ';') from tables

Thanks for the advice, help.
Hopefully this helps someone in the future.