Page 1 of 1
Copying data from a MySQL server to an embedded LOCAL instance
Posted: Wed 04 Jul 2007 09:31
Hi,
Can anyone suggest the most efficient way to copy all data from the MySQL server to an embedded LOCAL instance so that users can work with the application off line
thanks in advance for any ideas.
regards
Mark
Posted: Wed 04 Jul 2007 14:46
by saidus
Hi !!
you may dump the Database on the server (import DDL statments) the recreate all objects in local ...
you can use the TMyDump or directelly with mysqldump.exe
Posted: Wed 04 Jul 2007 14:58
saidus wrote:Hi !!
you may dump the Database on the server (import DDL statments) the recreate all objects in local ...
you can use the TMyDump or directelly with mysqldump.exe
Hi,
What I need is the DB, tables and data or a direct copy of data from the server to an embedded instance on the users LOCAL system and I don't beleive MyDump is appropriate. Assuming the Local DB structure already exisits but the tables are empty or its a completly empty DB I either wish to copy all data across form the MySQL system to the LOCAL embedded DB table by table but efficiently or create DB, Create tables and then transfer the data. Hope that makes sence. What I currently do is basically clear the local table and then copy the MySQL server data (LAN data) table by table , row by row to the LOCAL embedded instance. I don't think this is the most efficient way to be honest asn was hoping for suggestions on a better solution.
regards
Mark
Posted: Wed 04 Jul 2007 15:12
by saidus
you can use mysqldymp.exe
Code: Select all
mysqldump --database dbname > a.sql
then when you get this file "a.sql" you pass it to your local server to recreate all database
like this
(in local)
or you can recreate all the structure of your net dbase then import only data
finally you inject tha hole data in your local DB[/quote]
Posted: Wed 04 Jul 2007 15:22
saidus wrote:you can use mysqldymp.exe
Code: Select all
mysqldump --database dbname > a.sql
then when you get this file "a.sql" you pass it to your local server to recreate all database
like this
(in local)
or you can recreate all the structure of your net dbase then import only data
finally you inject tha hole data in your local DB
[/quote]
Hi,
thanks for the reply. However your suggestion relies upon command prompt exe and the synchronising to the LOCAL embedded DB needs to be on the fly such that a user needs the most up to date copy now to take away to walk on client site for example so he runs a syncronising application which copied all the data from the MySQL server tables to the LOCAL Embedded DB to take away. Any subsequent requests for a LOCAL copy of the data will also need to be on the fly as passwords and the like are constantly changing so the application must be able to sync the Embedded DB with the MYSQL DB dynamically whenever requested and get the most upto date copy of the data.
regards
Mark
Posted: Thu 05 Jul 2007 07:07
by Antaeus
You can try to use the TCRBatchMove component to synchronize data in tables of two databases.