Mysql replication

Discussion in 'Server Operation' started by mrpink, Jun 8, 2009.

  1. mrpink

    mrpink New Member

    Hi,

    I had configured Mysql in a Master > Slave configuration from a tutorial on here, I have recently moved my backups from the Master to the slave because it was causing issues with the web application when it was backing up the database in the early hours of the morning. What I have realised though when it backs up the slave the amount of data each day is not increasing at all which is obviously not right but it says the replication is working and I can see it on the processlist on the master?

    28970723 | replication | db02:34588 | NULL | Binlog Dump | 3067 | Has sent all binlog to slave; waiting for binlog to be updated | NULL

    On the slave show slave status shows

    Slave_IO_Running: Yes
    Slave_SQL_Running: Yes

    show processlist on the slave shows

    1004 | system user | | NULL | Connect | 241832 | Waiting for master to send event | NULL |
    | 1005 | system user | | NULL | Connect | 3240 | Has read all relay log; waiting for the slave I/O thread to update it | NULL

    Just doesn't show the host as DB01 its just blank on the slave

    Any ideas?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's the full output of
    Code:
    SHOW SLAVE STATUS\G
    on the slave?
     
  3. mrpink

    mrpink New Member

    Hi

    It is

    mysql> show slave status \G
    *************************** 1. row ***************************
    Slave_IO_State: Waiting for master to send event
    Master_Host: db01
    Master_User: replication
    Master_Port: 3306
    Connect_Retry: 60
    Master_Log_File: mysql-bin.000136
    Read_Master_Log_Pos: 98
    Relay_Log_File: slave-relay.001301
    Relay_Log_Pos: 235
    Relay_Master_Log_File: mysql-bin.000136
    Slave_IO_Running: Yes
    Slave_SQL_Running: Yes
    Replicate_Do_DB: example_database
    Replicate_Ignore_DB:
    Replicate_Do_Table:
    Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
    Last_Errno: 0
    Last_Error:
    Skip_Counter: 0
    Exec_Master_Log_Pos: 98
    Relay_Log_Space: 235
    Until_Condition: None
    Until_Log_File:
    Until_Log_Pos: 0
    Master_SSL_Allowed: No
    Master_SSL_CA_File:
    Master_SSL_CA_Path:
    Master_SSL_Cert:
    Master_SSL_Cipher:
    Master_SSL_Key:
    Seconds_Behind_Master: 0
    1 row in set (0.00 sec)


    Thanks,
    Will
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Can the slave resolve db01? Might be better to use an IP address instead of db01.
     
  5. mrpink

    mrpink New Member

    Hi,

    It can yes as its hostname is in /etc/hosts

    I can connect with the mysql client also with the replication details
     

Share This Page