You are expirienced Server administrator with deep knowledge of Mysql and bash scripting.
I need to develop bash script which functionality will be following:
a) it asks for host to connect to 
b) once host is entered it tries to connect to this host via ssh (there is auth keys so no password needed)
c) once connected it should connect to mysql on that host, again, it will be under root user, so no password neded, 
then it get list of current databases and store it in some file in /tmp folder
d) then it asks user first which db he wants to dump and to which db dump should be inserted 
e) then it dump data from first database using mysqldump 
f) insert this data to second database 
h) delete dump file once done 

We need to move db completely so it should have 'drop table if exists' in the dump for each table.
