feature request: copy database

sergtop posted 9 years ago in General
would be nice to have a copy database feature
create table `new_db`.table_name....
insert into `new_db`.`table_name` select * from `old_db`.table_name

through all selected tables or full database
ansgar posted 9 years ago
That's 100% doable with the SQL export dialog, at least the newer one can be used in such a way:
* Right click a database > Export database as SQL
* Databases: [ ] Drop [ ] Create
* Tables: [ ] Drop [X] Create
* Output: Database
* Database: [Select your favorite]
sergtop posted 9 years ago
it is, but if copying big DB (>5Gb) it is very very slow comparing to phpmyadmin for instance
heidi - 2,5 hours
pma - 10min
ansgar posted 9 years ago
Which revision of HeidiSQL are you comparing to PMA? I can't believe the recent builds need such a long time. The export dialog was rewritten for performance reasons in r2748.
sergtop posted 9 years ago
rev 2877
ansgar posted 9 years ago
Hm, well in that case the export should definitely be faster for 5 GB. Is it probably your network connection being a bit slow? The data has to be surely transferred over network, and it helps a lot to switch on compression in your session parameters.

PMA normally runs on the server where MySQL is also running, therefore it doesn't have the slow connection.
sergtop posted 9 years ago
seems you are right. the data is to be transfered to my pc and then back to server to another db... compression is set, but it is really connection-dependent situation

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