Time management b/w two server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soheb
    New Member
    • Aug 2007
    • 2

    #1

    Time management b/w two server

    Hi,

    We have two server one in India and canada, and replication is set up in both mysql database, and its working fine. But the problem arises when i insert a query here using now() function in one server and when i see the result in same server it shows correct time, when i see in other server it is not showing the local time of other server, it shows two hours diffence time.

    example: If in Indian server i fire a query using now() function and when i see in indian server i see the same time , but in canada server server i see two hours diff then that of canada local time.

    can any one help me how to solve this issue, Thanks in advance.
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    In slave server, it saves the data with time which saved on master server not NOW(). The replication slaves have the exact data of master server.

    Comment

    • soheb
      New Member
      • Aug 2007
      • 2

      #3
      hi,
      Thanks for your reply.
      In slave its saving different time. Not the same time.

      Comment

      • mwasif
        Recognized Expert Contributor
        • Jul 2006
        • 802

        #4
        Do you have the same time zone on both the servers?MySQL Manual says...
        The same system time zone should be set for both master and slave. Otherwise some statements will not be replicated properly, such as statements that use the NOW() or FROM_UNIXTIME() functions.

        Comment

        Working...