distal-attribute
distal-attribute
distal-attribute
distal-attribute

Copy some tables

User, date Message
Written by Tintenmann
6 months ago
Category: General
3 posts since Mon, 14 Oct 13
Hello together,

is it possible to copy some tables of a local db with heidisql via a ssh tunnel to a db at my provider. The connections will work, but i find no easy way to copy the tables. I hope there is a way to have something like a batch workaround for a one-click-copy, because i have to do it perioticly in the same way.

Thank for help.

Kind regards

Tintenmann
Written by ansgar
6 months ago
4800 posts since Fri, 07 Apr 06
Yes, the SQL export is made for such tasks.

Ensure you have set up sessions for both the target and source servers, then:

* Connect to the source server
* Click Tools > Export database as SQL
* Check the relevant tables in the tree
* Select the target server in the "Output" pulldown menu
* Select target database in "Database" pulldown menu
* Uncheck create/drop database
* Check create tables
* click export
Written by Tintenmann
6 months ago
3 posts since Mon, 14 Oct 13
Thanks, it works!
Written by Tintenmann
6 months ago
3 posts since Mon, 14 Oct 13
OK, another question.
Because i have every day to do the same thing, the source, the target and the tableselecion is the same, i ask if there is a way to put all the explained thinks in a 'one-click-action' or is it necessary to make the steps everytime from the beginning?
Written by ansgar
6 months ago
4800 posts since Fri, 07 Apr 06
No, except for some basic settings which HeidiSQL restores the next time you call that dialog, there is no one-click solution here. But you can create such automated tasks with a shell script: Use mysqldump(.exe) to export data into a .sql file, and afterwards import that file using mysql(.exe).
 

Please login to leave a reply, or register at first.