was there a crash-shutdown of the slave now failing are there clients that have write access to the slave

else you most likely have to set up the slave from scratch to get it in sync with the master again
you do *not* want it to continue with replication if it isn't in sync anymore … which the error you are getting is strongly indicating

or skip this entry?
hmmm

only skip the entry if you are sure that everything else is in sync

ok, how to skip it?
sry i`m lame and pitty but i need to start it

search for "skip the next statement" on http://dev.mysql.com/doc/refman/5.0/en/replication-problems.html

ok

you better resync your slave since you do not know what state is your slave and just making a guess where to start to replicate

hartmut how to tell that duplicates are not critical for me

well … that is a question only you can answer … and in doubt: set up the slave from scratch (as already mentioned)

the insert is able to determine that the row already exist due to the primary key or unique key, but some statement like update or delete may just execute without error and you will never realise a problem had occur

heya, is there something similar to unix more/less for mysql console? It'd be easier to view the data if I could just use pgup/down or something similar

i need to stop 10 mysql hosting which are now wery important
i can`t

with replication you want the data on both server to be the same, but if you start to replicate at the wrong position, it will not work

do this

if what the INSERT tries to add is *exactly* what is already in that row on the slave then it *might* still be in sync and just hit by a replication glitch
well, chose your poison …

yep but i need to know how can i determine my position

you determine that whe you setup your replication, if you don't know how, i don;t know how you can setup your replication

there is no way to quickly check whether a slave is in sync with the master, sorry …
but duplicate key errors strongly indicate that it *isn't* in sync

how to find MASTER_LOG_POS=???????

and only you can decide whether the risk of running an out-of-sync slave is ok or not

has your replication runing fine previously or fail when you just started

?? SHOW SLAVE STATUS?

yes its running fine

was there a crash/shutdown of the slave now failing? are there clients that have write access to the slave?

yes

yes to what?

clients have write acces to slawe

this is bad …

and porpobly was shutdown
hard reset

resync from scratch … you won't get any other recommendation from me without detailed knowledge of your setup and application
or skip the failing statement on your own risk

my aplication is designed to not use functions like update
i only insert data
becaus mysql have problems with that in my sytations

ok, so skip of the failing INSERT should be safe *if* you can verify that it is going to insert what is in there on the salve anyway

maybe try to do a select on the slave and check that row with the unique key and see if the data is the same as those of the insert statement

ok
i try

if same, skip it, if not, you have to decide what to do

if same, how to skip it for all?
i dont wana do this by SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; and check if error is or not
in slave start and syslog

the slave skip counter is the way

what if i skeep to much?

that will ignore 1 statement, the insert that fail
the 1 is number of statement to ignore

replication is fun!

so i can skipp 1000 and what if i skeep 500 much more than i should?

skip 1 at a time

that's bad.

sry, i hold my mouth.

you can also set your slave to skip duplicate key errors…

yhy that will solve my problems for long time
pls explain.

there is an option called slave-skip-errors, expecting a comma seperated list of error codes

ew

you might want to check with mysql-table-sync if your tables are synchronous, I wouldn't recommend keeping that active for long time, just to get your replication back on track.
these duplicate key errors have a reason, maybe something writes to the slave?

my app write to slave
but i dont use update only insert to prevent sucha problems
i have 11 hosts

err…

all conected to 1 master
in repication data ring
and on 10 nodes hanging my app which one have write acces
to slave

all 11 has the same problem?

maybe I misunderstood, but I learned that in replication setups you write to one master and read from many slaves

now only 1

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: