Replication - urgent

2007-12-09 Thread Ratheesh K J
Hello All,

I set up replication between 2 servers recently. I just need one db to be 
replicated and the SHOW SLAVE STATUS shows this:

 Relay_Master_Log_File: gyana01-bin.02
 Slave_IO_Running: Yes
 Slave_SQL_Running: No
 Replicate_Do_DB: tallydb,tallydb

Now the problem is that there is another db named tallydbopextblob and the 
tables from this db are also getting replicated as shown in the below line.

Last_Error: Error 'Table 'tallydbopextblob.TBL_EVAL_PITEM_OP_EXT_DETAILS' 
doesn't exist' on query. Default database: 'tallydb'. Query: 'INSERT INTO 
tallydbopextblob.TBL_EVAL_PITEM_OP_EXT_DETAILS( 
FLD_OP_INPUT_DATA,FLD_OP_INDEX_DATA1,FLD_OP_INSTANCE_ID) 
VALUES('type=FPCONNECTsource=TALLYrequest_type=ACTIVATIONoffline_flag=0serial=372123675major_version=7minor_version=2major_release=3minor_release=14build_num=rel7.2_3.14_2007-05-21_19.33platform=WINos=WINuser_name=serverhost_name=SERVERlic_ver=2fingerprint63=1mQ0nE8HkaBlNRg==aa,3GAwmgzLMbCGNJyMyaa,3GAwmgzLMbCGNJyMyaa,2NDkxODk0MjUyAA==finger_print=5qZEKE5HgchxNpnOZ3GyZaaserver_id=0activation_code
 ...


Why is this happening?

Thanks  regards,
Ratheesh

Replication - urgent

2007-11-05 Thread Ratheesh K J
Hello All,

I need to add a couple of more tables to the list of tables to be replicated 
from a particular db in the salve my.cnf.

Can this be done without restarting the mysql server on the slave?

Thanks  regards,
Ratheesh

Replication - urgent

2007-10-16 Thread Ratheesh K J
Hello all,

I cannot afford to stop my slave server. I have list of tables of the master 
that are being replicated on the slave.

Now I want to remove a couple of tables from this list without affecting the 
master and slave. How is this possible?

Thanks  regards,
Ratheesh

Re: Replication - urgent

2007-10-16 Thread Baron Schwartz

Running this statement on the master should do it:

DROP TABLE table1, table2...;

That will remove the tables.

Baron

Ratheesh K J wrote:

Hello all,

I cannot afford to stop my slave server. I have list of tables of the master 
that are being replicated on the slave.

Now I want to remove a couple of tables from this list without affecting the 
master and slave. How is this possible?

Thanks  regards,
Ratheesh



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



Re: [Replication] - urgent

2007-10-03 Thread Ratheesh K J
Thanks,

It helped me a lot. I wanted to know 
  1.. what are the various scenarios where my replication setup can fail? 
(considering even issues like network failure and server reboot etc). What is 
the normal procedure to correct the failure when something unpredicted happens?
  2.. What are the scenarios where the SQL THREAD stops running and what are 
the scenarios where the IO THREAD stops running? 
  3.. Does SQL_SLAVE_SKIP_COUNTER skip the statement of the master binlog from 
being replicated to the slave relay log OR Has the statement already been 
copied into the slave relay log and has been skipped from the relay log?
  4.. How do I know immediately that replication has failed? ( have heard that 
the enterprise edition has some technique for this )?
Thanks  regards,
Ratheesh

- Original Message - 
From: Jan Kirchhoff [EMAIL PROTECTED]
To: Ratheesh K J [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Sent: Tuesday, October 02, 2007 4:16 PM
Subject: Re: [Replication] - urgent


 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

Re: [Replication] - urgent

2007-10-03 Thread Jan Kirchhoff

Ratheesh K J schrieb:

Thanks,
 
It helped me a lot. I wanted to know


   1. what are the various scenarios where my replication setup can
  fail? (considering even issues like network failure and server
  reboot etc). What is the normal procedure to correct the failure
  when something unpredicted happens?

You should first read the right parts of the manual at 
https//dev.mysql.com/doc before asking such questions.

Basically:
-Use good hardware with ECC-RAM and RAID-Controllers in order to 
minimize trouble with faulty hardware.
-Never write on the slaves without knowing what this could do to your 
replication setup
-Watch the diskspace and make sure it's always enough space for the 
binlogs. Otherwise you might end up with half-written binlogs on either 
the slave or master because of a full disk which can cause trouble and 
some work to get it up and running again.


When a master goes down or network connection is lost, the slave 
automatically tries to reconnect once a minute or so. Restarting the 
master or exchanging some network equipment is no problem. When the 
slave reboots, it tries to reconnect on startup, too.


This is out-of-the-box-behaviour. You can modify it in the my.cnf 
(i.e. use the  skip-slave-start option etc)



   1. What are the scenarios where the SQL THREAD stops running and
  what are the scenarios where the IO THREAD stops running?

SQL thread stops when it can't run a SQL-Query from the binlogs for any 
reason, as you have experiences when the table already existed.


The IO-Thread only stops when it has an error reading a binlog from the 
master. When its only a lost connection, it automatically reconnects.
Other problems (i.e. unable to read a binlog) should never happen as 
long a you don't delete binlogs on the master that have not yet been 
copied over to the slave by the io-thread (show master status and 
show slave status commands and their output) or you have faulty 
hardware (io_errors on the harddisk or such things)



   1. Does SQL_SLAVE_SKIP_COUNTER skip the statement of the master
  binlog from being replicated to the slave relay log OR Has the
  statement already been copied into the slave relay log and has
  been skipped from the relay log?

it skips the entry on the local copy of the binlog. The IO-Thread 
replicates the whole binlog and the sql-thread skips an entry in it when 
you use sql_slave_skip_counter


   1. How do I know immediately that replication has failed? (
  have heard that the enterprise edition has some technique for
  this )?

watch the logfile, it is written there. Or run a cronjob once a minute 
with something like
mysql -e 'show slave status\G' |grep '_Running:' /dev/null || bash 
my_alarm_script_that_sends_mail_or_whatever.sh




regards
Jan

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



[Replication] - urgent

2007-10-02 Thread Ratheesh K J
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

Re: [Replication] - urgent

2007-10-02 Thread Jan Kirchhoff

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]