I need to take a mysqldump of specific tables across all databases in a cluster.
In this case the cluster has more than 300+ databases. And I need to take the dump of
table2 from each of the 300+ databases.
Then I need to restore the dump to another cluster, to a single database having
table2. Essentially, the data from the tables in the 300+ databases above needs to be consolidated to the tables in a single database in this cluster.
Cluster A has information about a company's employees in a table called
Employees which is spread out across databases that represent the company's locations, like database
New York etc...
I need to take a dump of all the
Employee tables across the location databases.
Then in Cluster B, there will be a database called
USA in which there will be a table called
Employees which will have a union of all the Employee information from the above dump.