Ratheesh K J schrieb:
Hello all,

I issued a create table statement on the master for a table which was not 
present on the master but present on the slave.
I did this purposely to see the error on slave.

I am a newbie to replication. Now when i see SLave status on the slave machine 
it shows that the SQL Thread has stopped.

When I start the SQL thread it does not start and gives the error message that 
the table exists. How do i correct this and how do I calculate the next 
position that the slave must start executing from the relay log.

Is there any article on MySQL replication that tells me how to deal when errors 
occur.

Thanks & regards,
Ratheesh

You have 2 options:

1.
on the slave, enter "SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;" and then "SLAVE START;" on the slave. This skips the upcoming entry in the binlog which is the create table command that causes your problem.

2.
if you don't have any data in the table on the slave, just drop the table and do a "slave start;", it will then create the table again as this is the next command in the binlog.

Remember: never write on the slave without knowing what you do and you'll be happy with your replication ;)

Jan

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to