>>>>> "Van" == Van  <[EMAIL PROTECTED]> writes:

    Van> No.  Just have the slave connect to the master using the ip
    Van> address.

I have set up the master and slave now and am getting a problem.  When
the slave tries to connect, it appears to be attempting to enter a
value that is already in one of my database tables, and gives the
error:


[root@newman mysql]# tail /var/log/mysqld.log 
020314 19:37:28  Slave: connected to master '[EMAIL PROTECTED]:3306',  replication 
started in log 'FIRST' at position 4
ERROR: 1062  Duplicate entry '2472160-101.bmp-2' for key 1
020314 19:37:28  Slave:  error running query 'INSERT INTO multifile VALUES (
       2472160,
       '2001-3-9',
       '101.bmp',
       2
       )' 
020314 19:37:28  Error running query, slave aborted. Fix the problem, and re-start the 
slave thread with "mysqladmin start-slave". We stopped at log 'mother-bin.002' 
position 73
020314 19:37:28  Slave thread exiting, replication stopped in log 'mother-bin.002' at 
position 73

I rsync'd the data dirs on master and slave and tried to follow the
directions in the mysql manual on replication.  The only thing that
was different for me was that on the master the owners of some of the
subdirs and files in the mysql data dir are root.root and I needed to
change these to mysql.mysql or I got an error about not being able to
read the *.frm files on entering the slave.

When I go ahead and connect to the slave mysql server, I get the
version number of the slave and not the master, and when I make
changes to update the master, I do not see them on the slave.  So it
appears that it is simply reading the data files that I transferred
over before restarting master and slave.

Here is the master my.cnf:


[root@mother var]# cat /etc/my.cnf
[mysqld]
datadir=/usr/local/mysql/var/
socket=/var/lib/mysql/mysql.sock
log-bin
server-id=1
     
[mysql.server]
user=mysql
basedir=/usr/local/mysql

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


And the slave my.cnf:
[root@newman mysql]# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
master-host=128.135.97.130
master-user=repl
master-password=somepass
master-port=3306
server-id=2
     
[mysql.server]
user=mysql
basedir=/var/lib

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





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to