how to fetch and calculate data from remote database and insertinto local database
how to fetch and calculate data from remote database and insertinto local database
am 25.06.2009 07:12:48 von Nathan Huang
Hello
I want to fetch and calculate the data from remote database(for example
Japan) and insert them into my local database(for example usa), does
mysql have such function to do it, or do I have to write a script using
perl or other language to help achieving it?
thank you in advance
nathan
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: how to fetch and calculate data from remote database and insert
am 25.06.2009 10:19:12 von Uma Bhat
--00163631094fff378f046d27e01a
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
What exactly do you want to calculate?
Generally, export (mysqldump cmd) and import (mysql cmd) of data is done as
below:
Supposing "japan" is the source db and "usa" is your destination db,
1) Dump the database on source server:
$ cd
$ mysqldump -u -S -p japan >
../source_japan.dbdmp
2) ssh to destination host
3) Check if that folder is shared between remote and local host. else,
Step4.
4) scp the dump file from souce host to destination host:
$ @::>
5) Import the dumpfile to destination db:
$ mysql -u -p -S usa <
../source_japan.dbdmp
Regards,
Uma
On 6/25/09, Nathan Huang wrote:
>
> Hello
> I want to fetch and calculate the data from remote database(for example
> Japan) and insert them into my local database(for example usa), does mysql
> have such function to do it, or do I have to write a script using perl or
> other language to help achieving it?
> thank you in advance
> nathan
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=bhat.uma@gmail.com
>
>
--00163631094fff378f046d27e01a--
Re: how to fetch and calculate data from remote database and insert into local database
am 25.06.2009 11:17:41 von John Daisley
Depending on what you mean by 'Calculate the data', you could try using a
tool like Talend (www.talend.com).
> What exactly do you want to calculate?
>
> Generally, export (mysqldump cmd) and import (mysql cmd) of data is don=
e
> as
> below:
>
> Supposing "japan" is the source db and "usa" is your destination db,
>
> 1) Dump the database on source server:
>
> $ cd
> $ mysqldump -u -S -p japan >
> ./source_japan.dbdmp
>
> 2) ssh to destination host
> 3) Check if that folder is shared between remote and local host. else,
> Step4.
> 4) scp the dump file from souce host to destination host:
>
> $
> @:
:>
>
>
> 5) Import the dumpfile to destination db:
> $ mysql -u -p -S usa <
> ./source_japan.dbdmp
>
>
> Regards,
> Uma
>
>
> On 6/25/09, Nathan Huang wrote:
>>
>> Hello
>> I want to fetch and calculate the data from remote database(for exampl=
e
>> Japan) and insert them into my local database(for example usa), does
>> mysql
>> have such function to do it, or do I have to write a script using perl
>> or
>> other language to help achieving it?
>> thank you in advance
>> nathan
>>
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dbhat.uma@gmail=
..com
>>
>>
>
>
> ______________________________________________
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg
Re: how to fetch and calculate data from remote database and insert
am 25.06.2009 11:28:21 von bharani kumar
u asking any scripts
On 6/25/09, John Daisley wrote:
> Depending on what you mean by 'Calculate the data', you could try using a
> tool like Talend (www.talend.com).
>
>> What exactly do you want to calculate?
>>
>> Generally, export (mysqldump cmd) and import (mysql cmd) of data is done
>> as
>> below:
>>
>> Supposing "japan" is the source db and "usa" is your destination db,
>>
>> 1) Dump the database on source server:
>>
>> $ cd
>> $ mysqldump -u -S -p japan >
>> ./source_japan.dbdmp
>>
>> 2) ssh to destination host
>> 3) Check if that folder is shared between remote and local host. else,
>> Step4.
>> 4) scp the dump file from souce host to destination host:
>>
>> $
>> @::>
>>
>>
>> 5) Import the dumpfile to destination db:
>> $ mysql -u -p -S usa <
>> ./source_japan.dbdmp
>>
>>
>> Regards,
>> Uma
>>
>>
>> On 6/25/09, Nathan Huang wrote:
>>>
>>> Hello
>>> I want to fetch and calculate the data from remote database(for example
>>> Japan) and insert them into my local database(for example usa), does
>>> mysql
>>> have such function to do it, or do I have to write a script using perl
>>> or
>>> other language to help achieving it?
>>> thank you in advance
>>> nathan
>>>
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe: http://lists.mysql.com/mysql?unsub=bhat.uma@gmail.com
>>>
>>>
>>
>>
>> ______________________________________________
>> This email has been scanned by Netintelligence
>> http://www.netintelligence.com/email
>>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=bharanikumariyerphp@gmail .com
>
>
--
Regards
B.S.Bharanikumar
http://php-mysql-jquery.blogspot.com/
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: how to fetch and calculate data from remote database and insert
am 25.06.2009 11:45:06 von Lin Chun
--001485f19f063017c4046d2914e5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi
I think you mean that you want to get some results (by calculating the data
in remote database) and then stock them in local database;
so dosen't need to dump the db and transfer to local,but need to do some
program to fetch the result and insert into the local database;
In addition, like John said, you can try to use Talend or Kettle to avoid
the coding part.
On Thu, Jun 25, 2009 at 7:12 AM, Nathan Huang
wrote:
> Hello
> I want to fetch and calculate the data from remote database(for example
> Japan) and insert them into my local database(for example usa), does mysql
> have such function to do it, or do I have to write a script using perl or
> other language to help achieving it?
> thank you in advance
> nathan
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=franks1984@gmail.com
>
>
--
-------------------------
Lin Chun
--001485f19f063017c4046d2914e5--
Re: how to fetch and calculate data from remote database and insertinto local database
am 27.06.2009 04:22:22 von Shawn Green
Hello Nathan,
Nathan Huang wrote:
> Hello
> I want to fetch and calculate the data from remote database(for example
> Japan) and insert them into my local database(for example usa), does
> mysql have such function to do it, or do I have to write a script using
> perl or other language to help achieving it?
> thank you in advance
> nathan
>
While transfer time between the two servers can become an issue, MySQL
does allow you to treat a database in a different MySQL instance (it
could be in the next slot in your rack or anywhere else your network can
reach). The secret is the FEDERATED database engine.
http://dev.mysql.com/doc/refman/5.1/en/federated-storage-eng ine.html
--
Shawn Green, MySQL Senior Support Engineer
Sun Microsystems, Inc.
Office: Blountville, TN
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org