replication issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • muldoon

    #1

    replication issue

    I'm having quite a fuss with my two MySQL DB servers lately. I'm trying
    to establish replication between a MySQL 4.0.20 server (master) and a
    MySQL 4.1.11 server (slave).

    From what I read, replication from a 4.0.x server -> 4.1.x server will
    work, just not the other way around.

    However, that's not really my problem. After unsuccessfully completing
    the configuration myself, I used
    http://forums.gentoo.org/viewtopic.php?t=241123 as a guide. I followed
    the instructions explicitly, but alas it does not work. I've been
    through every mailing list, forum post and google query imaginable, but
    I haven't found an answer. Now i'm asking any of you all knowing and
    powerful mysql guru's to help!

    Here's the setup:

    MySQL Server 1 (master) my.cnf:
    -------------------------------------------------
    [mysqld]
    datadir=/var/lib/mysql
    log-slow-queries=/var/log/mysql/slow_queries.lo g
    tmpdir=/var/tmp/mysql
    set-variable = key_buffer_size =128M
    set-variable = max_allowed_pac ket=1M
    set-variable = max_connections =500
    ### irb set-variable = long_query_time = 3
    set-variable = thread_cache_si ze=70
    set-variable = sort_buffer=12M
    log-bin=/var/log/mysql/binary/mysql_binary_lo g
    binlog-do-db=articles
    server-id=1

    [safe_mysqld]
    err-log=/var/log/mysql/mysqld.log
    -------------------------------------------------

    MySQL Server 2 (db1): MySQL 4.1.11
    -------------------------------------------------

    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    old_passwords=1
    server-id=2
    master-host=<IP Address>
    master-user=replicatio n
    master-password=<super secret password>
    replicate-do-db=articles

    [mysql.server]
    user=mysql
    basedir=/var/lib

    [mysqld_safe]
    err-log=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
    -------------------------------------------------

    I've checked skip-networking, its set to false on both servers. Both
    servers are not behind a firewall either.

    Here's the error I get on the slave when I restart the mysqld service:
    -------------------------------------------------
    050923 09:07:31 mysqld started
    050923 09:07:31 InnoDB: Started; log sequence number 0 43634
    /usr/libexec/mysqld: ready for connections. Version: '4.1.11' socket:
    '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
    050923 09:07:31 [Note] Slave SQL thread initialized, starting
    replication in log 'mysql_binary_l og.001' at position 79080, relay log
    './db1-relay-bin.000001' position: 4
    050923 09:07:31 [ERROR] Slave I/O thread: error connecting to master
    'replication@<I P Address>:3306': Error: 'Can't connect to MySQL server
    on '<IP Address>' (13)' errno: 2003 retry-time: 60 retries: 86400
    -------------------------------------------------

    Here's what SHOW SLAVE STATUS\G; shows me:
    -------------------------------------------------
    mysql> show slave status\G;
    *************** ************ 1. row *************** ************
    Slave_IO_State: Connecting to master
    Master_Host: <IP Address>
    Master_User: replication
    Master_Port: 3306
    Connect_Retry: 60
    Master_Log_File : mysql_binary_lo g.001
    Read_Master_Log _Pos: 79080
    Relay_Log_File: db1-relay-bin.000001
    Relay_Log_Pos: 4
    Relay_Master_Lo g_File: mysql_binary_lo g.001
    Slave_IO_Runnin g: Yes
    Slave_SQL_Runni ng: Yes
    Replicate_Do_DB :
    Replicate_Ignor e_DB:
    Replicate_Do_Ta ble:
    Replicate_Ignor e_Table:
    Replicate_Wild_ Do_Table:
    Replicate_Wild_ Ignore_Table:
    Last_Errno: 0
    Last_Error:
    Skip_Counter: 0
    Exec_Master_Log _Pos: 79080
    Relay_Log_Space : 4
    Until_Condition : None
    Until_Log_File:
    Until_Log_Pos: 0
    Master_SSL_Allo wed: No
    Master_SSL_CA_F ile:
    Master_SSL_CA_P ath:
    Master_SSL_Cert :
    Master_SSL_Ciph er:
    Master_SSL_Key:
    Seconds_Behind_ Master: NULL
    1 row in set (0.00 sec)

    ERROR:
    No query specified
    -------------------------------------------------

    I'm stumped. Any help would be greatly appreciated and you'll be
    instantly added to my christmas card list if you provide me with a
    solution! mmmm, honey baked ham!

    Thank you in advance for any help and i apologize for this insanely long
    newsgroup post.
  • Gordon Burditt

    #2
    Re: replication issue

    >Here's the error I get on the slave when I restart the mysqld service:[color=blue]
    >-------------------------------------------------
    >050923 09:07:31 mysqld started
    >050923 09:07:31 InnoDB: Started; log sequence number 0 43634
    >/usr/libexec/mysqld: ready for connections. Version: '4.1.11' socket:
    >'/var/lib/mysql/mysql.sock' port: 3306 Source distribution
    >050923 09:07:31 [Note] Slave SQL thread initialized, starting
    >replication in log 'mysql_binary_l og.001' at position 79080, relay log
    >'./db1-relay-bin.000001' position: 4
    >050923 09:07:31 [ERROR] Slave I/O thread: error connecting to master
    >'replication@< IP Address>:3306': Error: 'Can't connect to MySQL server
    >on '<IP Address>' (13)' errno: 2003 retry-time: 60 retries: 86400[/color]

    If that (13) is an OS error code, it's "Permission denied".
    Is your database directory owned by user mysql (or whatever user
    runs the daemon) on the slave? Can that user create the relay-bin
    files? Also check to ensure that the slave can actually log in to
    the master using the login information you gave it. Does the
    user on the master used by the slave have "replicatio n slave" privilege?
    (Show grants for replication@<IP Address of slave> on the master).

    Gordon L. Burditt

    Comment

    • muldoon

      #3
      Re: replication issue

      Gordon Burditt wrote:[color=blue][color=green]
      >>Here's the error I get on the slave when I restart the mysqld service:
      >>-------------------------------------------------
      >>050923 09:07:31 mysqld started
      >>050923 09:07:31 InnoDB: Started; log sequence number 0 43634
      >>/usr/libexec/mysqld: ready for connections. Version: '4.1.11' socket:
      >>'/var/lib/mysql/mysql.sock' port: 3306 Source distribution
      >>050923 09:07:31 [Note] Slave SQL thread initialized, starting
      >>replication in log 'mysql_binary_l og.001' at position 79080, relay log
      >>'./db1-relay-bin.000001' position: 4
      >>050923 09:07:31 [ERROR] Slave I/O thread: error connecting to master
      >>'replication@ <IP Address>:3306': Error: 'Can't connect to MySQL server
      >>on '<IP Address>' (13)' errno: 2003 retry-time: 60 retries: 86400[/color]
      >
      >
      > If that (13) is an OS error code, it's "Permission denied".
      > Is your database directory owned by user mysql (or whatever user
      > runs the daemon) on the slave?[/color]

      yes, on both servers
      [color=blue]
      > Can that user create the relay-bin files?[/color]

      yes
      [color=blue]
      > Also check to ensure that the slave can actually log in to
      > the master using the login information you gave it.[/color]

      it can, tested that many times.
      [color=blue]
      > Does the user on the master used by the slave have "replicatio n slave" privilege?
      > (Show grants for replication@<IP Address of slave> on the master).[/color]

      used this query on the master server to create the account:

      GRANT REPLICATION SLAVE ON *.* TO 'replication'@' %' IDENTIFIED BY
      '<super secret password>';

      The method I used to setup the replication is detailed on the webpage I
      posted in my previous message. If you want to see exactly what I did,
      just view this page --> http://forums.gentoo.org/viewtopic.php?t=241123

      Comment

      • muldoon

        #4
        Re: replication issue

        muldoon wrote:[color=blue]
        > Gordon Burditt wrote:
        >[color=green][color=darkred]
        >>> Here's the error I get on the slave when I restart the mysqld service:
        >>> -------------------------------------------------
        >>> 050923 09:07:31 mysqld started
        >>> 050923 09:07:31 InnoDB: Started; log sequence number 0 43634
        >>> /usr/libexec/mysqld: ready for connections. Version: '4.1.11'
        >>> socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
        >>> 050923 09:07:31 [Note] Slave SQL thread initialized, starting
        >>> replication in log 'mysql_binary_l og.001' at position 79080, relay
        >>> log './db1-relay-bin.000001' position: 4
        >>> 050923 09:07:31 [ERROR] Slave I/O thread: error connecting to master
        >>> 'replication@<I P Address>:3306': Error: 'Can't connect to MySQL
        >>> server on '<IP Address>' (13)' errno: 2003 retry-time: 60 retries:
        >>> 86400[/color]
        >>
        >>
        >>
        >> If that (13) is an OS error code, it's "Permission denied".
        >> Is your database directory owned by user mysql (or whatever user
        >> runs the daemon) on the slave?[/color]
        >
        >
        > yes, on both servers
        >[color=green]
        >> Can that user create the relay-bin files?[/color]
        >
        >
        > yes
        >[color=green]
        >> Also check to ensure that the slave can actually log in to
        >> the master using the login information you gave it.[/color]
        >
        >
        > it can, tested that many times.
        >[color=green]
        >> Does the user on the master used by the slave have "replicatio n slave"
        >> privilege?
        >> (Show grants for replication@<IP Address of slave> on the master).[/color]
        >
        >
        > used this query on the master server to create the account:
        >
        > GRANT REPLICATION SLAVE ON *.* TO 'replication'@' %' IDENTIFIED BY
        > '<super secret password>';
        >
        > The method I used to setup the replication is detailed on the webpage I
        > posted in my previous message. If you want to see exactly what I did,
        > just view this page --> http://forums.gentoo.org/viewtopic.php?t=241123[/color]

        So no one has any idea from this point?

        Comment

        Working...