Multi-table auto-seperate exports

[expired user #3265]'s profile image [expired user #3265] posted 16 years ago in Import/Export Permalink
Hello,
My team and I have just started using this product to import, modify, and export our projects. We would like to say thank you so much for creating this product. Up until now we have tried using PMA, NaviCat, and SQLyog; and absolutely none of them come close to being able to do what this product does as fast or as clean as Heidi does. So first, thank you for your hard work!

I do have a question about this as I haven't yet been able to find an answer. Is there a way to export multiple tables from the selected database at once to a given directory and have it separate each table into files <tablename>.sql? Having to export 100+ tables one by one is a pain in the rear and very time consuming and takes away from development time. If there isn't a way to do this yet could this be considered a feature request for future releases? I will attempt to program a patch to allow this but my programming skills are a bit limited so I'll probably spend more time breaking stuff than making it work. xD

Thanks!
--X
ansgar's profile image ansgar posted 16 years ago Permalink
Thanks for the plaudit!

Currently HeidiSQL does not support exporting tables to seperate files. I would recommend using mysqldump.exe for such a job. All you have to do is to compose a commandline for each table you want to export, fx like this one:
mysqldump -hlocalhost -umyname -pmypass -fc:\temp\[TABLENAME].sql --opt dbname [TABLENAME]

Where [TABLENAME] is a dynamic variable in a loop over the result of
SHOW TABLES FROM dbname


That's doable with some lines of any programming language which is able to connect to your mysql server.
[expired user #3265]'s profile image [expired user #3265] posted 16 years ago Permalink
Hey,
Thanks for the response. I will try this but I prefer to have the HeidiSQL header on my sql files, I'd rather use your program to do it 1 by 1. Would you consider making this an optional feature in one of the future versions of Heidi? I'm sure it would be beneficial to more than just me.

Thanks,
--X
ansgar's profile image ansgar posted 16 years ago Permalink
Yes, I think that's worth a feature request. Would you be so kind and post it to our feature tracker?
ducpham's profile image ducpham posted 4 years ago Permalink

Hi @ansgar,

Sorry to dig up an old thread but did you incorporate multiple table export into Heidi SQL yet?

ansgar's profile image ansgar posted 4 years ago Permalink

Well this thread is really old. And I suppose this is what I implemented for that request:

Description

You can even use placeholders in the directory input box:

Description

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