Tip: MySQL Replication Error: Duplicate Entry for Key
I have encountered this error, which to my surprise occurred on a slave database.
error 'Duplicate entry '2355476' for key 1' on query ' INSERT INTO logs (DateStamp) VALUES (NOW())
You might be wondering how a slave database could have a duplicate entry while the master and other slaves are running just fine?
Some say that there could be an entry where it was written in the slave and then written again so the duplicate error occurred. Others say that if myisamchk was run in the master, it removed some entries and tries to create those entries again. The slave then attempts to write the same entry, but since myisamchk was not executed on the slave, the entry exists hence the duplication error.
But luckily, found myself a solution to fix the replication error:
mysql> set sql_slave_skip_counter = 1;
Query OK, 0 rows affected (0.01 sec)
mysql> slave start;
Query OK, 0 rows affected (0.00 sec)
This will skip the error and continue on with the replication. Do not forget to start the slave process afterwards.
PinoyTux Site Downtime
Some of you might notice that for the last few hours, the site is blank. Meaning, you can literally build your own blog in my site.
read more
John Dvorak: The Sun-MySQL Deal Stinks
This commentary made by John Dvorak points out that the deal between Sun and MySQL favors Sun.
The move, announced earlier this week, is potentially a disaster for the entire sector for reasons I’ll outline here.
Let’s begin by putting MySQL in perspective: It’s the most competitive and biggest threat to Oracle Corp., if for no other reason than it’s cheaper, and in many applications, more practical.
It’s used extensively by the open-source community and is the engine that runs almost all the blogging software — including the successful WordPress, which is used as the blogging-content back end for the New York Times, among other large commercial enterprises.
Sun has an awful track record with its acquisitions. Here is a recent official list.
Sun’s crummy results go way back and include unique and useful products such as TOPS — a PC to Mac file-sharing OS, which was bought by Sun in 1987, then rotted from neglect.
From another perspective, you have to wonder why MySQL was sold in the first place and who orchestrated this deal.
If anyone actually knew that MySQL was up for grabs, I expect that Google, Yahoo and certainly Microsoft Corp. would have been interested, and there should have been a publicized bidding war resulting in a much higher price than $1 billion.
I’m close to being convinced that Oracle wanted to buy MySQL to kill the product, but knew that it couldn’t pull off the stunt itself. It would be too obvious, especially to European Union regulators. So it sent in a stooge to do the job.
The two companies, Sun and Oracle, have been strategic partners for years. On top of that, Sun cannot actually afford to spend a $1 billion on a company producing a mere $60 million in revenue and working outside its core competencies.
So who can afford it? Oracle, that’s who. This deal stinks from top to bottom.
So there you have it. Somehow, Dvorak made some points but then again, maybe we are overanalyzing things.
Sun Microsystems To Acquire MySQL for $1B
cnn.com reports:
SAN FRANCISCO (AP) — Sun Microsystems Inc. has agreed to buy open-source software maker MySQL AB for $1 billion, beefing up the server maker’s database offerings with a company whose technology is used by some of the world’s biggest Web sites.
Santa Clara-based Sun, in separate announcements before the market opened, said its second quarter revenue would narrowly exceed Wall Street estimates. It also said profit would fall at the high end of analysts’ expectations. The company revealed its preliminary results ahead of schedule.
The acquisition, expected to close in the third or fourth quarter, takes pressure off Sun to spend some of the cash it’s been accumulating. It also bolsters its software offerings with a well-known name in Internet data retrieval.
What will become of MySQL after the acquisition? In my super humble opinion, there are only two things that could happen: MySQL’s growth will surpass its previous records or MySQL will go down the drain. Fighting my inner pessimist, I hope that MySQL will continue to be what it is today or even better for the sake of this blog ![]()
Search PinoyTux
Subscribe to Email Feeds
Blog Lounge
Popular Posts
Recent Posts
Drop your Card Here
Recent Comments
- smeaferrepove on Howto: Install yum On RHEL 4
- Anidich1 on Tip: Add User and Generate Password Script
- Tom S on Cebu Pacific Sucks
- kadersardar on PinoyTux Spreads Some CommentLuv
- Steve on Creative Labs Threatens Third Party Driver Modder








