feature request: copy database

[expired user #4516]'s profile image [expired user #4516] posted 14 years ago in General Permalink
would be nice to have a copy database feature
like
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's profile image ansgar posted 14 years ago Permalink
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]
[expired user #4516]'s profile image [expired user #4516] posted 14 years ago Permalink
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's profile image ansgar posted 14 years ago Permalink
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.
[expired user #4516]'s profile image [expired user #4516] posted 14 years ago Permalink
rev 2877
ansgar's profile image ansgar posted 14 years ago Permalink
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.
[expired user #4516]'s profile image [expired user #4516] posted 14 years ago Permalink
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.