<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iTechLog &#187; 1062 &#8211; Duplicate entry &#8217;2147483647&#8242; for key 1</title>
	<atom:link href="http://itechlog.com/tag/1062-duplicate-entry-2147483647-for-key-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://itechlog.com</link>
	<description>Your source to IT solutions, interesting technology news and code snipets.</description>
	<lastBuildDate>Tue, 10 Jan 2012 17:06:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Error 1062 &#8211; Duplicate entry &#8217;2147483647&#8242; for key 1</title>
		<link>http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/</link>
		<comments>http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 12:19:14 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[Easy Tips]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[1062 - Duplicate entry '2147483647' for key 1]]></category>
		<category><![CDATA[CRE Loaded]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHPMySQL]]></category>

		<guid isPermaLink="false">http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/</guid>
		<description><![CDATA[<a href="http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/" title="Error 1062 - Duplicate entry &#039;2147483647&#039; for key 1"></a>CRE Loaded was giving me the error&#160; 1062 &#8211; Duplicate entry &#8217;2147483647&#8242; for key 1 &#8211; when trying to add a new product. Cause: for some unexplained reason the auto_increment ID field on Table &#8220;products&#8221; has gone up to 2147483647 &#8230;<p class="read-more"><a href="http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/" title="Error 1062 - Duplicate entry &#039;2147483647&#039; for key 1"></a><p><a target="_blank" href="http://www.creloaded.com/"><b>CRE Loaded</b></a> was giving me the error&nbsp; <b>1062 &#8211; Duplicate entry &#8217;2147483647&#8242; for key 1</b> &#8211; when trying to add a new product.</p>
<p><b>Cause</b>: for some unexplained reason the auto_increment ID field on Table &#8220;products&#8221; has gone up to 2147483647 which is apparently the maximum number of rows permitted in an INT column.</p>
<p>Fix:
<ol>
<li>Go to your <a target="_blank" href="http://www.phpmyadmin.net/home_page/index.php"><b>phpMyadmin</b></a> interface</li>
<li>Backup your database (make sure you know how to restore it if needed)</li>
<li>Browse the products table (select to sort the fields by Descending order)</li>
<li>The top item should now have the ID = 2147483647</li>
<li>Change the ID to a number up from the previous item (e.g.: Previous was ID = 301, than change the ID = 2147483647 to 302)</li>
<li>Repeat same process with table &#8220;product_to_categories&#8221;</li>
<li>Return to table &#8220;products&#8221;</li>
<li>Select the SQL tab</li>
<li>run the following SQL Query :&nbsp; <b>ALTER TABLE products AUTO_INCREMENT=</b>303&nbsp;&nbsp; (note that 303 is the next number up from the example on step 5, you should use the next number up in your situation)</li>
</ol>
<p>It worked perfectly for me, hope this helps.</p>
<p></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/1062+-+Duplicate+entry+%272147483647%27+for+key+1' rel='tag' target='_self'>1062 - Duplicate entry '2147483647' for key 1</a>, <a class='technorati-link' href='http://technorati.com/tag/CRE+Loaded' rel='tag' target='_self'>CRE Loaded</a>, <a class='technorati-link' href='http://technorati.com/tag/Database' rel='tag' target='_self'>Database</a>, <a class='technorati-link' href='http://technorati.com/tag/MySQL' rel='tag' target='_self'>MySQL</a>, <a class='technorati-link' href='http://technorati.com/tag/PHPMySQL' rel='tag' target='_self'>PHPMySQL</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>August 12, 2010 -- <a href="http://itechlog.com/linux/2010/08/12/linuxcon-2010-just-for-fun-poll-results-explained/" title="LinuxCon 2010 Just for Fun Poll Results explained">LinuxCon 2010 Just for Fun Poll Results explained</a></li><li>April 21, 2009 -- <a href="http://itechlog.com/open-source/2009/04/21/oracle-to-own-mysql/" title="Oracle to own MySQL">Oracle to own MySQL</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/easy-tips/2009/07/10/error-1062-duplicate-entry-2147483647-for-key-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

