Data transfer

Data transfer

am 11.04.2008 08:59:17 von Krishna Chandra Prajapati

------=_Part_15592_16922185.1207897157899
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

What ever queries are executed on 5 mysql server with multiple database
(more than one database on each mysql server). I have to reflect all the
changes on 1 mysql server (developement server for developers)

Initially, I thought to take take the queries from bin-log and execute on
development server. But, from the bin-log list. I am not able to identify
that which queries belong to which database.

Content of bin-log (multiple database)
# at 266708750
#080410 4:04:27 server id 1 end_log_pos 148 Query
thread_id=460143 exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_time_stamp_1 SET TIME_TOTAL='-999' WHERE USER_ID='8394042' AND
TASK='2.30';
# at 266708898
#080410 4:04:27 server id 1 end_log_pos 266708925 Xid = 22953623
COMMIT;
# at 266708925
#080410 4:04:27 server id 1 end_log_pos 162 Query
thread_id=460143 exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_cookie SET VALUE = '2.30_1207830154' WHERE USER_ID = '8394042'
AND PARAM = 'CURRENTTASK';
# at 266709087
#080410 4:04:27 server id 1 end_log_pos 266709114 Xid = 22953624
COMMIT;

What are the possible ways to perform this task.

--Thanks,
Krishna Chandra Prajapati

------=_Part_15592_16922185.1207897157899--

RE: Data transfer

am 11.04.2008 09:59:03 von Muthukumar-Fijilive

HI

Option 1

If you are using PHP, you can do this very simply using CRON task.

Make a field for to update either your first operation is successful (eg.
Update the field value to 1 ). Run a CRON job in particular interval if the
field updated as 1 then call your second operation query and make the field
value 0.


Option 2

If you are using MySql 5.0. check the trigger examples to perform the on
update ...

And follow the same idea like update a field value 1 and write a trigger for
upate.


I hope this will give you idea.


Thanks & regards,
Muthukumar Selvarasu,
Project Manager (Web Development),
Webmasters Ltd.




-----Original Message-----
From: Krishna Chandra Prajapati [mailto:prajapatikc@gmail.com]
Sent: Friday, April 11, 2008 6:59 PM
To: mysql; replication@lists.mysql.com
Subject: Data transfer

Hi,

What ever queries are executed on 5 mysql server with multiple database
(more than one database on each mysql server). I have to reflect all the
changes on 1 mysql server (developement server for developers)

Initially, I thought to take take the queries from bin-log and execute on
development server. But, from the bin-log list. I am not able to identify
that which queries belong to which database.

Content of bin-log (multiple database)
# at 266708750
#080410 4:04:27 server id 1 end_log_pos 148 Query
thread_id=460143 exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_time_stamp_1 SET TIME_TOTAL='-999' WHERE USER_ID='8394042' AND
TASK='2.30'; # at 266708898
#080410 4:04:27 server id 1 end_log_pos 266708925 Xid = 22953623
COMMIT;
# at 266708925
#080410 4:04:27 server id 1 end_log_pos 162 Query
thread_id=460143 exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_cookie SET VALUE = '2.30_1207830154' WHERE USER_ID = '8394042'
AND PARAM = 'CURRENTTASK';
# at 266709087
#080410 4:04:27 server id 1 end_log_pos 266709114 Xid = 22953624
COMMIT;

What are the possible ways to perform this task.

--Thanks,
Krishna Chandra Prajapati


--
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: Data transfer

am 11.04.2008 10:01:28 von Muthukumar Selvarasu

HI

Option 1

If you are using PHP, you can do this very simply using CRON task.

Make a field for to update either your first operation is successful (eg.
Update the field value to 1 ). Run a CRON job in particular interval if the
field updated as 1 then call your second operation query and make the field
value 0.


Option 2

If you are using MySql 5.0. check the trigger examples to perform the on
update ...

And follow the same idea like update a field value 1 and write a trigger for
upate.


I hope this will give you idea.


Thanks & regards,
Muthukumar Selvarasu,
Project Manager (Web Development),
Webmasters Ltd.




-----Original Message-----
From: Krishna Chandra Prajapati [mailto:prajapatikc@gmail.com]
Sent: Friday, April 11, 2008 6:59 PM
To: mysql; replication@lists.mysql.com
Subject: Data transfer

Hi,

What ever queries are executed on 5 mysql server with multiple database
(more than one database on each mysql server). I have to reflect all the
changes on 1 mysql server (developement server for developers)

Initially, I thought to take take the queries from bin-log and execute on
development server. But, from the bin-log list. I am not able to identify
that which queries belong to which database.

Content of bin-log (multiple database)
# at 266708750
#080410 4:04:27 server id 1 end_log_pos 148 Query
thread_id=460143 exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_time_stamp_1 SET TIME_TOTAL='-999' WHERE USER_ID='8394042' AND
TASK='2.30'; # at 266708898
#080410 4:04:27 server id 1 end_log_pos 266708925 Xid = 22953623
COMMIT;
# at 266708925
#080410 4:04:27 server id 1 end_log_pos 162 Query
thread_id=460143 exec_time=0 error_code=0
SET TIMESTAMP=1207825467;
UPDATE user_cookie SET VALUE = '2.30_1207830154' WHERE USER_ID = '8394042'
AND PARAM = 'CURRENTTASK';
# at 266709087
#080410 4:04:27 server id 1 end_log_pos 266709114 Xid = 22953624
COMMIT;

What are the possible ways to perform this task.

--Thanks,
Krishna Chandra Prajapati


--
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: Data transfer

am 11.04.2008 11:37:25 von Ananda Kumar

------=_Part_13595_6341884.1207906645647
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

does your development server have only one database or multiple database.

regards
anandkl


On 4/11/08, Krishna Chandra Prajapati wrote:
>
> Hi,
>
> What ever queries are executed on 5 mysql server with multiple database
> (more than one database on each mysql server). I have to reflect all the
> changes on 1 mysql server (developement server for developers)
>
> Initially, I thought to take take the queries from bin-log and execute on
> development server. But, from the bin-log list. I am not able to identify
> that which queries belong to which database.
>
> Content of bin-log (multiple database)
> # at 266708750
> #080410 4:04:27 server id 1 end_log_pos 148 Query
> thread_id=460143 exec_time=0 error_code=0
> SET TIMESTAMP=1207825467;
> UPDATE user_time_stamp_1 SET TIME_TOTAL='-999' WHERE USER_ID='8394042' AND
> TASK='2.30';
> # at 266708898
> #080410 4:04:27 server id 1 end_log_pos 266708925 Xid = 22953623
> COMMIT;
> # at 266708925
> #080410 4:04:27 server id 1 end_log_pos 162 Query
> thread_id=460143 exec_time=0 error_code=0
> SET TIMESTAMP=1207825467;
> UPDATE user_cookie SET VALUE = '2.30_1207830154' WHERE USER_ID = '8394042'
> AND PARAM = 'CURRENTTASK';
> # at 266709087
> #080410 4:04:27 server id 1 end_log_pos 266709114 Xid = 22953624
> COMMIT;
>
> What are the possible ways to perform this task.
>
> --Thanks,
> Krishna Chandra Prajapati
>

------=_Part_13595_6341884.1207906645647--

Re: Data transfer

am 14.04.2008 07:56:21 von Krishna Chandra Prajapati

------=_Part_27776_18366180.1208152581259
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Development server has multiple databases.

On Fri, Apr 11, 2008 at 3:07 PM, Ananda Kumar wrote:

> does your development server have only one database or multiple database.
>
> regards
> anandkl
>
>
> On 4/11/08, Krishna Chandra Prajapati wrote:
> >
> > Hi,
> >
> > What ever queries are executed on 5 mysql server with multiple database
> > (more than one database on each mysql server). I have to reflect all the
> > changes on 1 mysql server (developement server for developers)
> >
> > Initially, I thought to take take the queries from bin-log and execute
> > on
> > development server. But, from the bin-log list. I am not able to
> > identify
> > that which queries belong to which database.
> >
> > Content of bin-log (multiple database)
> > # at 266708750
> > #080410 4:04:27 server id 1 end_log_pos 148 Query
> > thread_id=460143 exec_time=0 error_code=0
> > SET TIMESTAMP=1207825467;
> > UPDATE user_time_stamp_1 SET TIME_TOTAL='-999' WHERE USER_ID='8394042'
> > AND
> > TASK='2.30';
> > # at 266708898
> > #080410 4:04:27 server id 1 end_log_pos 266708925 Xid = 22953623
> > COMMIT;
> > # at 266708925
> > #080410 4:04:27 server id 1 end_log_pos 162 Query
> > thread_id=460143 exec_time=0 error_code=0
> > SET TIMESTAMP=1207825467;
> > UPDATE user_cookie SET VALUE = '2.30_1207830154' WHERE USER_ID =
> > '8394042'
> > AND PARAM = 'CURRENTTASK';
> > # at 266709087
> > #080410 4:04:27 server id 1 end_log_pos 266709114 Xid = 22953624
> > COMMIT;
> >
> > What are the possible ways to perform this task.
> >
> > --Thanks,
> > Krishna Chandra Prajapati
> >
>
>

------=_Part_27776_18366180.1208152581259--