Hello.


> 1.How to send MySQL versions on master and slave.



Send an output of the following statement executed both on master

and slave:

  select version();





> 2.Where I have to include output of 'SHOW SLAVE STATUS'.



Execute SHOW SLAVE STAUTS on your slave (run START SLAVE before)

and include the output in your answer. In such way you could find

the  position of the last event executed by the SQL thread from the

master's binary log. See:

  http://dev.mysql.com/doc/mysql/en/show-slave-status.html



> 3.How to Fix the problem if it does occurs.



First check with mysqlbinlog utility if master and relay binary logs

contain the same query.



> 4.How to restart the slave SQL thread with "SLAVE START".



You should find where the error occurred, fix it, possibly by

executing SQL query on the slave. Than 'CHANGE MASTER' to corresponding

position in the master binary log and start slave. If your's data

size is small, sometimes it is better to setup replication again.

However, finding the cause of the problem is preferred way.







> 

> Thanks again for your help and cooperation.

> 

> Anurag

> 

> 

> -----Original Message-----

> From: Gleb Paharenko [mailto:[EMAIL PROTECTED]

> Sent: Thursday, June 30, 2005 3:20 PM

> To: mysql@lists.mysql.com

> Subject: Re: Duplicate entry error

> 

> 

> Hello.

> 

> Please examine your master's binary and slave's relay logs with

> mysqlbinlog utility to find if sent and received SQL statements are

> different. Sent your MySQL versions on master and slave. Include

> complete output of 'SHOW SLAVE STATUS'. If your version is rather old,

> check if the problem remains after upgrade.

> 

> 

> 

> [EMAIL PROTECTED] wrote:

>>=0D

>> Hi all,

>> I am getting duplicate entry error while inserting data in the table.=0D

>> My table name is TEMP and it contains only one field which is primary=0D

>> key=3D ,nt null as well as auto increment .

>>=0D

>> 050628 16:05:00  Slave: Error 'Duplicate entry '77' for key 1' on=0D

>> query 'INSERT INTO TEMP VALUES ()'. Default database: '<our database=0D

>> name is=3D

>> here>', Error_code: 1062

>> 050628 16:05:00  Error running query, slave SQL thread aborted.=3D0D Fix

> 

>> the problem, and restart the slave SQL thread with "SLAVE START". We=3D=0D

>> stopped at log 'log-bin.018' position 37918

>>=0D

>> I have a master slave setup.So slave database has entries upto 77 only

> 

>> but=3D master database has entries upto 114. If I again start inesrting=0D

>> entries then entries in slave database will=3D start from 115 which is=0D

>> really danagerous for me.

>>=0D

>> I couldn't understand the statement=3D0D

>>=0D

>> Fix the problem, and restart the slave SQL thread with "SLAVE START".

>>=0D

>> Can anybody help me in solving this issue ?

>>=0D

>> Thanks and Regards,

>> Anurag

>>=0D

>>=0D

>> -----Original Message-----

>> From: Johan H=3DF6=3DF6k [mailto:[EMAIL PROTECTED]

>> Sent: Thursday, June 30, 2005 2:01 PM

>> To: [EMAIL PROTECTED]

>> Cc: Siegfried Heintze; mysql@lists.mysql.com

>> Subject: Re: Wanted: Help with 'ON DUPLICATE KEY' syntax

>>=0D

>>=0D

>> Hi Jocelyn,

>> you're right of course. I didn't read the original post closely enough

> 

>> (it's early in the morning here...). I missed that SELECT wasn't used.

>>=0D

>> Regards,

>>        /Johan

>>=0D

>> [EMAIL PROTECTED] wrote:

>>> Hi Johan,

>>>=3D0D

>>> I don't think it's its problem, since MySQL returns a "You have an=3D0D

> 

>>>error in your SQL syntax." error, and not those specified in this=0D

>>>bug=3D0D  report. This means the SQL parser failed to understand its=0D

>>>query. =3D0D  Regards,

>>>   Jocelyn

>>>=3D0D

>>>=3D0D

>>>>Hi Siegfried,

>>>>I think you've run into bug #8732:

>>>>...

>>>>Description:

>>>>if you do a INSERT INTO table (col_list) SELECT ... ON DUPLICATE=0D

>>>>KEY=3D0D UPDATE and refer to the same column in the col_list and in the

> 

>>>>UPDATE=3D0D clause, it will bail out, doesn't seem like it should,=0D

>>>>since not listing the column in the INSERT

>>>>list will make it work.

>>>>...

>>>>

>>>>I've run into it myself on 4.1.12.

>>>>

>>>>/Johan

>>>>

>>>>Siegfried Heintze wrote:

>>>>

>>>>>Thanks for deciphering that terrible message, Shawn. I=0D

>>>>>accidentally=3D0D must have hit the paste key too many times.

>>>>>

>>>>>Anyway, here is my new insert statement:

>>>>>

>>>>>

>>>>>INSERT INTO jobtitlecount (fkJobPosting, dtSnapShot, cJobTitle)=3D0D=0D

>>>>>VALUES

>>>>>(211584,'2005-06-26',2) ON DUPLICATE KEY UPDATE cJobTitle=3D3D2

>>>>>

>>>>>

>>>>>DBD::mysql::st execute failed: You have an error in your SQL=0D

>>>>>syntax.=3D0D Check the manual that corresponds to your MySQL server=0D

>>>>>version for=3D0D the right syntax to use near 'ON DUPLICATE KEY UPDATE

> 

>>>>>cJobTitle=3D3D2' at=3D

>> =3D0D

>>>>>line 1 at ./crawl-hot-jobs.pl line 675.

>>>>>

>>>>>

>>>>>

>>>>>I'm looking at the documentation on=3D0D=0D

>>>>>http://dev.mysql.com/doc/mysql/en/insert.html and I don't see what=0D

>>>>>I=3D0D am doing wrong.

>>>>>

>>>>>Thanks,

>>>>>Siegfried

>>>>>

>>>>>

>>>>

>>>>

>>>>--

>>>>MySQL General Mailing List

>>>>For list archives: http://lists.mysql.com/mysql

>>>>To unsubscribe:    http://lists.mysql.com/mysql?unsub=3D

>> [EMAIL PROTECTED]

>>>=3D0D

>>>=3D0D

>>>=3D0D

>>>=3D0D

>>=0D

>>=0D

>>=0D

>>=0D

>> Confidentiality Notice=3D0D

>>=0D

>> The information contained in this electronic message and any=0D

>> attachments to=3D this message are intended for the exclusive use of the

> 

>> addressee(s) and may contain confidential or=3D privileged information.=0D

>> If you are not the intended recipient, please notify the sender at=0D

>> Wipro or=3D [EMAIL PROTECTED] immediately

>> and destroy all copies of this message and any attachments.

>>=0D

> 

> 

> --=0D

> For technical support contracts, goto

> https://order.mysql.com/?ref=3Densita

> This email is sponsored by Ensita.NET http://www.ensita.net/

>   __  ___     ___ ____  __

>  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko

> / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]

> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET

>       <___/   www.mysql.com

> 

> 

> 

> 

> --=0D

> MySQL General Mailing List

> For list archives: http://lists.mysql.com/mysql

> To unsubscribe:

> http://lists.mysql.com/[EMAIL PROTECTED]

> 

> 

> 

> 

> Confidentiality Notice=0D

> 

> The information contained in this electronic message and any attachments to=

> this message are intended

> for the exclusive use of the addressee(s) and may contain confidential or=

> privileged information. If

> you are not the intended recipient, please notify the sender at Wipro or=

> [EMAIL PROTECTED] immediately

> and destroy all copies of this message and any attachments.

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




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

Reply via email to