Migration Scheme - from one mysql DB to another mysql DB
Migration Scheme - from one mysql DB to another mysql DB
am 13.03.2010 14:44:47 von talofo talofo
Hello all,
If possible, I would like to ask and have your help about the methods =
and
procedures that should exist to accomplish the following task:
I need to grab some data from one mySQL database with some specific =
table
and field names, to another mySQL database with specific table and field
names. The destination database tables are empty.
What is a common procedure to do on those cases? Is there any? Several? =
What
are the most common?
If I need to be more specific in order to benefit from your help, =
please,
let me know.
Best regards,
M=E1rcio
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Migration Scheme - from one mysql DB to another mysql DB
am 13.03.2010 17:09:37 von Per Jessen
MEM wrote:
> Hello all,
>=20
> If possible, I would like to ask and have your help about the methods=
> and procedures that should exist to accomplish the following task:
> I need to grab some data from one mySQL database with some specific
> table and field names, to another mySQL database with specific table
> and field names. The destination database tables are empty.
>=20
> What is a common procedure to do on those cases? Is there any?
Dump all data from table1, optionally alter column names (e.g. using
sed), load all data into table2. =20
--=20
Per Jessen, Zürich (5.0°C)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Migration Scheme - from one mysql DB to another mysql DB
am 13.03.2010 17:32:38 von Teus Benschop
On Sat, 2010-03-13 at 17:09 +0100, Per Jessen wrote:
> > If possible, I would like to ask and have your help about the methods
> > and procedures that should exist to accomplish the following task:
> > I need to grab some data from one mySQL database with some specific
> > table and field names, to another mySQL database with specific table
> > and field names. The destination database tables are empty.
> >=20
> > What is a common procedure to do on those cases? Is there any?
There may be several ways, but one way would be to open a mysqli
connection to one database, another mysqli connection to the other
database, then to pump all data over, optionally filtering the data.
Teus.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Migration Scheme - from one mysql DB to another mysql DB
am 13.03.2010 18:47:20 von Robert Cummings
MEM wrote:
> Hello all,
>
> If possible, I would like to ask and have your help about the methods and
> procedures that should exist to accomplish the following task:
> I need to grab some data from one mySQL database with some specific table
> and field names, to another mySQL database with specific table and field
> names. The destination database tables are empty.
>
> What is a common procedure to do on those cases? Is there any? Several? What
> are the most common?
> If I need to be more specific in order to benefit from your help, please,
> let me know.
If it's the same server just different databases, then MySQL allows
queries between databases and you could do it in a single query.
Something like the following:
INSERT INTO DB1.TABLE1 ( field1, field2, field3 ) SELECT field1, field2,
field3 FROM DB2.TABLE1;
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Migration Scheme - from one mysql DB to another mysql DB
am 13.03.2010 20:40:47 von Phpster
Rob's approach is what I use as well, if faced with this issue. It's
quick and simple to do.
Bastien
Sent from my iPod
On Mar 13, 2010, at 12:47 PM, Robert Cummings
wrote:
> MEM wrote:
>> Hello all,
>> If possible, I would like to ask and have your help about the
>> methods and
>> procedures that should exist to accomplish the following task:
>> I need to grab some data from one mySQL database with some specific
>> table
>> and field names, to another mySQL database with specific table and
>> field
>> names. The destination database tables are empty.
>> What is a common procedure to do on those cases? Is there any?
>> Several? What
>> are the most common?
>> If I need to be more specific in order to benefit from your help,
>> please,
>> let me know.
>
> If it's the same server just different databases, then MySQL allows
> queries between databases and you could do it in a single query.
> Something like the following:
>
> INSERT INTO DB1.TABLE1 ( field1, field2, field3 ) SELECT field1,
> field2, field3 FROM DB2.TABLE1;
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Migration Scheme - from one mysql DB to another mysql DB
am 13.03.2010 21:12:23 von Rene Veerman
I'd like to know
- what type of hosting and OS the 2 databases are running.
- if they're (staying) on the same machine, and if not: whats the
available bandwith (up&down, low&peak) between the machines? any cost
to that bandwith?
- if you have admin rights on both databases.
- how often you need to do this and for how much data (in Mb)
On Sat, Mar 13, 2010 at 2:44 PM, MEM wrote:
> Hello all,
>
> If possible, I would like to ask and have your help about the methods and
> procedures that should exist to accomplish the following task:
> I need to grab some data from one mySQL database with some specific table
> and field names, to another mySQL database with specific table and field
> names. The destination database tables are empty.
>
> What is a common procedure to do on those cases? Is there any? Several? W=
hat
> are the most common?
> If I need to be more specific in order to benefit from your help, please,
> let me know.
>
>
> Best regards,
> M=E1rcio
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Migration Scheme - from one mysql DB to another mysql DB
am 14.03.2010 06:31:09 von talofo talofo
>=20
> I'd like to know
>=20
> - what type of hosting and OS the 2 databases are running.
> - if they're (staying) on the same machine, and if not: whats the
> available bandwith (up&down, low&peak) between the machines? any cost
> to that bandwith?
> - if you have admin rights on both databases.
> - how often you need to do this and for how much data (in Mb)
>=20
Thank you all for your replies.=20
I will leave you with more details, but, I believe the "single query
approach with two PDO (or mysqli) connections should be quite well. Both =
DB
are on the same server, Linux based one, but different dsn should apply. =
The bandwith cost will not be an issue, because we are talking about =
15MB of
data, or something similar.=20
I don't have admin rights but I can try to have them if I must to.
I believe this will be a single time, or, one in a long time run but, we =
can
never predict.=20
The destination table also has some random data filled fields that I =
need to
generate and introduce with the old data on this new database.
Wondering if mySQL Migration Toolkit can do the job?
Thanks a lot for your help,
M=E1rcio
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php