Hi
I recently needed to copy a medium sized table (200 000 records) from a MySQL server to the local MySQL database. My users have no file shares to the server and can access MySQL only. As we could not find a reliable and fast method we resorted to a primitive method of contructing a batch file (text) containing the MysqlDump and restore commands, then executing the batch file and waiting for the successful execution.
This method works remarkably well but I am afraid that one day we will encounter a version of windows that does not support dos calls like this and we will be in trouble.
For those who are asking how we do a mysql dump and restore in one step the answer is a Good trick of using a | to pipe the output of the MySQL dump into the restore process. If anyone is interested in how this is done, I would be glad to help.
Anyhow I am looking for a way of doing this kind of incredibly fast copy from within the Zeos components.
Warmest regards
M Parak
Durban
MySQLDump and Restore from within Delphi
Moderators: gto, cipto_kh, EgonHugeist
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi,
In my opinion this should not bedone using ZEOS components. The tools provided by Mysql just are the best for this kind of operations. It seems very unlikely that commandline supportwill completely disappear from Windows or any other OperatingSystem. And when it disappears there will be somebodywho writes that feature himself (eg the unix-like tools already available).
So my answer is : just don't try to change your winning team.
Zippo, I'm very interested in this MySqlBackup component. Isit freely available? Where?
Mark
In my opinion this should not bedone using ZEOS components. The tools provided by Mysql just are the best for this kind of operations. It seems very unlikely that commandline supportwill completely disappear from Windows or any other OperatingSystem. And when it disappears there will be somebodywho writes that feature himself (eg the unix-like tools already available).
So my answer is : just don't try to change your winning team.
Zippo, I'm very interested in this MySqlBackup component. Isit freely available? Where?
Mark