Unix Technical Forum

Replication set up, not replicating.

This is a discussion on Replication set up, not replicating. within the MySQL forums, part of the Database Server Software category; --> I'm trying to set up replication where the MASTER is on a remote server and the SLAVE is on ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-06-2008, 05:22 PM
mechphisto@gmail.com
 
Posts: n/a
Default Replication set up, not replicating.

I'm trying to set up replication where the MASTER is on a remote
server and the SLAVE is on a local box in the office.
Using this site:
http://www.howtoforge.com/mysql_database_replication
but while the MASTER DB is going along its merry, the SLAVE isn't
updating its data. When I do
mysq> SHOW SLAVE STATUS;
all the right info is in the fields...along with an entry for
"Slave_IO_State: Waiting for master to send event".

I have it all set up exactly as stated (obviously replacing the
specific info like IP's and username) but with two significant
differences:

The site indicate to put the following in the SLAVE's my.cnf:
server-id=2
master-host=<master's remote IP>
master-user=repl
master-password=<secret>
master-connect-retry=60
replicate-do-db=exampledb

but I can't start mysql with those last two lines in there. (Yes,
"exampledb" is replaced with the actual DB name...although I have
about 5 I need to replicate). When I comment those two lines mysql
starts up fine.

I go ahead and do the stop slave; CHANGE MASTER etc., and start slave;
and I get OK messages...but no replication going on.

The other difference is that the example has the MASTER's IP set to an
IP on the same subnet. Mine is a completely remote server far far
away. The slave's box can ping it and vise versa, but I'm wondering if
the problem is some kind of across the intertubes communication. I was
able to scp the database dump files from the master to the slave
without a problem.

Anyway, any ideas?
Thanks!!
-Liam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-13-2008, 01:59 PM
mechphisto@gmail.com
 
Posts: n/a
Default Re: Replication set up, not replicating.

On Jun 6, 11:44*am, mechphi...@gmail.com wrote:
> I'm trying to set up replication where the MASTER is on a remote
> server and the SLAVE is on a local box in the office.
> Using this site:http://www.howtoforge.com/mysql_database_replication
> but while the MASTER DB is going along its merry, the SLAVE isn't
> updating its data. When I do
> mysq> SHOW SLAVE STATUS;
> all the right info is in the fields...along with an entry for
> "Slave_IO_State: Waiting for master to send event".
>
> I have it all set up exactly as stated (obviously replacing the
> specific info like IP's and username) but with two significant
> differences:
>
> The site indicate to put the following in the SLAVE's my.cnf:
> server-id=2
> master-host=<master's remote IP>
> master-user=repl
> master-password=<secret>
> master-connect-retry=60
> replicate-do-db=exampledb
>
> but I can't start mysql with those last two lines in there. (Yes,
> "exampledb" is replaced with the actual DB name...although I have
> about 5 I need to replicate). When I comment those two lines mysql
> starts up fine.
>
> I go ahead and do the stop slave; CHANGE MASTER etc., and start slave;
> and I get OK messages...but no replication going on.
>
> The other difference is that the example has the MASTER's IP set to an
> IP on the same subnet. Mine is a completely remote server far far
> away. The slave's box can ping it and vise versa, but I'm wondering if
> the problem is some kind of across the intertubes communication. I was
> able to scp the database dump files from the master to the slave
> without a problem.
>
> Anyway, any ideas?
> Thanks!!
> -Liam


No suggestions or advice?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-13-2008, 01:59 PM
Willem Bogaerts
 
Posts: n/a
Default Re: Replication set up, not replicating.

> No suggestions or advice?

Is there anything in the error log?

Good luck,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 06-13-2008, 01:59 PM
mechphisto@gmail.com
 
Posts: n/a
Default Re: Replication set up, not replicating.

On Jun 10, 2:17 am, Willem Bogaerts <w.bogae...@kratz.nl> wrote:
> > No suggestions or advice?

>
> Is there anything in the error log?
>


These are the last few lines:

080606 11:21:42 [Note] Slave SQL thread initialized, starting
replication in log 'mysql-bin.000002' at position 51571, relay log './
webserve-relay-bin.000001' position: 868

080606 11:21:42 [ERROR] Slave: Error 'Duplicate entry '24' for key 1'
on query. Default database: 'printing'. Query: 'INSERT INTO
ip_companyid VALUES ('24','bctcom','2008-06-06','Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
1.1.4322; Media Center PC 4.0)')', Error_code: 1062

080606 11:21:42 [ERROR] Error running query, slave SQL thread aborted.
Fix the problem, and restart the slave SQL thread with "SLAVE START".
We stopped at log 'mysql-bin.000002' position 51571

080606 11:21:42 [Note] Slave I/O thread: connected to master 'repl@[ip
address]:3306', replication started in log 'mysql-bin.000002' at
position 134029

Hmm, seems maybe a mistake in binary log bookmark/placement?
In the CHANGE MASTER TO command I used the same MASTER_LOG_POS given
in the MASTER's status query. =/

Thanks for the reply!!
-Liam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com