List:Replication« Previous MessageNext Message »
From:Tim Dunphy Date:April 15 2011 4:13pm
Subject:Re: replication is not automatic
View as plain text  
>I'd try using mysqldump instead of copying the data if in doubt, or  
>tar up the entire data dir, not just the DB subdirs.

Hi Andy!

 And thanks for your reply! What I've done is:
  
 1) Stopped the mysqld service on both master and slave.
 2) completely deleted the contents of /var/lib/mysql/* on the slave 
 3) rsync'd the entire contents of /var/lib/mysql/ from the master to the same directory
on the slave
 4) started up the service on both machines again
 5) logged into the master and got the master info
 6) put all that info that into the slave with the CHANGE MASTER TO command
 7) start slave on the slave host

 Now what happens is the same thing as before. Replication works for a little while. Then
it just quietly stops working and I have to issue STOP SLAVE and START SLAVE on the slave
host again in order for the slave to 'catch up' with the Read_Master_Log_Pos.


 The only warnings/errors from the mysql logs that I see on the server are these:

  110415  6:40:37 [Note] Slave SQL thread initialized, starting replication in log
'mysqlmaster.000013' at position 106, relay log './mysqld-relay-bin.000012' position: 4
110415  6:40:37 [ERROR] Slave I/O: error connecting to master
'repl@stripped:0' - retry-time: 3306  retries: 86400, Error_code: 2013


 And these are the logs from the slave:

 110415 10:40:58 [Note] Slave SQL thread initialized, starting replication in log
'mysqlmaster.000024' at position 479614, relay log './mysqld-relay-bin.000028' position:
390
110415 10:40:58 [Note] Slave I/O thread: connected to master
'repl@stripped:3306',replication started in log 'mysqlmaster.000024'
at position 479614
110415 10:40:58 [Note] Event Scheduler: Loaded 0 events
110415 10:40:58 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.56'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server
(GPL) by Remi
110415 12:07:34 [Note] Error reading relay log event: slave SQL thread was killed
110415 12:07:34 [Note] Slave I/O thread killed while reading event
110415 12:07:34 [Note] Slave I/O thread exiting, read up to log 'mysqlmaster.000025',
position 770474
110415 12:07:37 [Note] Slave SQL thread initialized, starting replication in log
'mysqlmaster.000025' at position 770474, relay log './mysqld-relay-bin.000032' position:
640678
110415 12:07:37 [Note] Slave I/O thread: connected to master
'repl@stripped:3306',replication started in log 'mysqlmaster.000025'
at position 770474


The last things you see here are me restarting slave replication on the slave host. 

I would certainly appreciate any input I can get on why this is happening and how to
correct it.

Thanks in advance!
Tim





----- Original Message -----
From: "a smith" <a.smith@stripped>
To: "Tim Dunphy" <bluethundr@stripped>
Cc: replication@stripped
Sent: Wednesday, April 13, 2011 4:02:45 PM
Subject: Re: replication is not automatic

Quoting Tim Dunphy <bluethundr@stripped>:

> I have tarred up each database in /var/lib/mysql and scp'd it to the  
> same location on the replication slave.

I'd try using mysqldump instead of copying the data if in doubt, or  
tar up the entire data dir, not just the DB subdirs.

ta Andy.



Thread
replication is not automaticTim Dunphy13 Apr
  • Re: replication is not automatica.smith13 Apr
    • Re: replication is not automaticTim Dunphy15 Apr
      • Re: replication is not automatica.smith15 Apr
        • Re: replication is not automaticTim Dunphy15 Apr
          • Re: replication is not automatica.smith19 Apr
          • Re: replication is not automaticars k25 Apr
            • Re: replication is not automaticTim Dunphy4 May
        • Re: replication is not automaticSuresh Kuna16 Apr
          • Re: replication is not automaticTim Dunphy16 Apr
            • Re: replication is not automaticSuresh Kuna16 Apr
              • Re: replication is not automaticTim Dunphy16 Apr
                • Re: replication is not automaticSuresh Kuna16 Apr
                  • Re: replication is not automaticTim Dunphy16 Apr
                    • Re: replication is not automaticSuresh Kuna16 Apr