I am faced with comparing the structures of multiple databases - but not the databases in their entirety, just the tables they all hold in common. I can export their structure via the interface, but have to click through the list of tables each time to define what I want exported. Is there a way I can access the export queries run by PHPMyAdmin in order to simply copy-paste each time?
phpMyAdmin 4.5.0+ supports export templates. On the export screen, you can create an export template with the settings you need. They are per server, but we can do something about that.
By default (this can be configured in PMA's config file), PMA stores these export templates in the database phpmyadmin
and table pma__export_templates
.
Provided that you have full access to all databases on your servers, including the phpmyadmin
one, you can do this:
- Create an export template with the settings you want on one of the servers.
- Export the export template itself from the
phpmyadmin.pma__export_templates
table. - Import the template to
phpmyadmin.pma__export_templates
on the next server. - Go to the export screen there and load the template.