<?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>Osman ERDOĞAN &#187; MySQL</title>
	<atom:link href="http://www.osmanerdogan.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.osmanerdogan.com</link>
	<description>Kişisel Web Sitesi ve Web Günlüğü</description>
	<lastBuildDate>Mon, 02 Jan 2012 09:01:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MySQL Çifte Kayıtları Bulma (Find Duplicate Rows)</title>
		<link>http://www.osmanerdogan.com/2011/06/08/mysql-cifte-kayitlari-bulma-find-duplicate-rows/</link>
		<comments>http://www.osmanerdogan.com/2011/06/08/mysql-cifte-kayitlari-bulma-find-duplicate-rows/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 08:29:58 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[çift kayıt]]></category>
		<category><![CDATA[dublicate rows]]></category>
		<category><![CDATA[duplicate]]></category>
		<category><![CDATA[kodlama]]></category>
		<category><![CDATA[rows]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=620</guid>
		<description><![CDATA[ Tablomuzda aynı kayıttan birden fala var diyelim ve hangilerinden fazla var bunları bulmak istiyoruz. Bu çoğu zaman ihtiyacımız olan bir durumdur. Nerede ne zaman ihtiyacımız olacak demeyin emin olun olur bir gün  
Örneğin:
uid    id    url
1    20    ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.osmanerdogan.com/wp-content/uploads/2009/01/4_mysql.jpg"><img class="alignleft size-full wp-image-361" style="margin: 5px; float:left;" title="MySQL" src="http://www.osmanerdogan.com/wp-content/uploads/2009/01/4_mysql.jpg" alt="" width="165" height="124" /></a> Tablomuzda aynı kayıttan birden fala var diyelim ve hangilerinden fazla var bunları bulmak istiyoruz. Bu çoğu zaman ihtiyacımız olan bir durumdur. Nerede ne zaman ihtiyacımız olacak demeyin emin olun olur bir gün <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Örneğin:</strong></p>
<p><code>uid    id    url<br />
1    20    google.com<br />
2    25    yahoo.com<br />
3    20    google.com<br />
4    25    yahoo.com<br />
5    20    google.com</code></p>
<p>Bu şekilde bir tabloda birden fazla olan kayıtları bulabiliriz. SQL sorgumuz şu şekilde olmalıdır.</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Select COUNT<span style="color:#006600; font-weight:bold;">&#40;</span>*<span style="color:#006600; font-weight:bold;">&#41;</span> as uid, url from tabloismi WHERE uid&amp;gt;<span style="color:#800000;color:#800000;">1</span> GROUP BY&amp;gt; url </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=620">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2011/06/08/mysql-cifte-kayitlari-bulma-find-duplicate-rows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WHM tmp dizinini genişletmek&#8230;</title>
		<link>http://www.osmanerdogan.com/2011/03/24/whm-tmp-dizinini-genisletmek/</link>
		<comments>http://www.osmanerdogan.com/2011/03/24/whm-tmp-dizinini-genisletmek/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 16:26:49 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[cpanel tmp]]></category>
		<category><![CDATA[linux server]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tmp dizini]]></category>
		<category><![CDATA[tmp genişletme]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[whm]]></category>
		<category><![CDATA[whm tmp]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=573</guid>
		<description><![CDATA[WHM/Cpanel server sahibi birisi olarak tmp dizini inanılmaz bir şekilde doluyordu 512 MB olunca  
Mysql işlemlerinde, execute süresi uzun olan işlemlerde sorun yaşıyordum, bazende apachenin kitlenmesine neden oluyordu.
Gelelim tmp dizinini genişletmeye;
PLAIN TEXT
CODE:




umount -l /tmp


dd if=/dev/zero of=/usr/tmpDSK bs=1024 count=2048000


mkfs.ext3 /usr/tmpDSK


mount -o loop,rw,noexec,nosuid /usr/tmpDSK /tmp


chmod 1777 /tmp 






tmp dizinimiz 2 GB ...]]></description>
			<content:encoded><![CDATA[<p><strong><img class="alignleft size-full wp-image-574" style="margin: 5px; float:left;" title="WHM Cpanel" src="http://www.osmanerdogan.com/wp-content/uploads/2011/03/WHM-Cpanel.jpg" alt="" width="300" height="68" />WHM/Cpanel</strong> server sahibi birisi olarak <strong>tmp</strong> dizini inanılmaz bir şekilde doluyordu 512 MB olunca <img src='http://www.osmanerdogan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Mysql işlemlerinde, execute süresi uzun olan işlemlerde sorun yaşıyordum, bazende apachenin kitlenmesine neden oluyordu.</p>
<p>Gelelim <strong>tmp</strong> dizinini genişletmeye;</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">umount -l /tmp</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">dd if=/dev/zero of=/usr/tmpDSK bs=<span style="color:#800000;color:#800000;">1024</span> count=<span style="color:#800000;color:#800000;">2048000</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mkfs.<span style="">ext3</span> /usr/tmpDSK</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mount -o loop,rw,noexec,nosuid /usr/tmpDSK /tmp</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod <span style="color:#800000;color:#800000;">1777</span> /tmp </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p><strong>tmp</strong> dizinimiz <strong>2 GB</strong> olmuştur. <strong>count</strong> değerini değiştirerek istediğiniz ölçüde tmp dizini oluşturabilirsiniz.</p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=573">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2011/03/24/whm-tmp-dizinini-genisletmek/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL&#8217;de bütün verilerde toplu yazı değişikliği</title>
		<link>http://www.osmanerdogan.com/2009/01/22/mysqlde-butun-verilerde-toplu-yazi-degisikligi/</link>
		<comments>http://www.osmanerdogan.com/2009/01/22/mysqlde-butun-verilerde-toplu-yazi-degisikligi/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 10:41:34 +0000</pubDate>
		<dc:creator>Osman ERDOĞAN</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[text replace]]></category>
		<category><![CDATA[toplu veri güncelleme]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[veri güncellemetoplu işlem]]></category>
		<category><![CDATA[yazı değiştirme]]></category>

		<guid isPermaLink="false">http://www.osmanerdogan.com/?p=357</guid>
		<description><![CDATA[Benim sürekli favori listesinde bulunan ve genelde ihtiyacım olan bir SQL satırıdır, sürekli ihtiyaç duyduğum için bazen unutuyorum, bazen linki bulamıyorum sıkıldım bu durumdan o yüzden sık sık bloguma yazmaya karar verdim sık kullandığım yazıları.
Bunlardan birisi MySQL de toplu olarak metin/veri değişikliği:
Örneklemek gerekirse;
Müşterilerimiz tablosu var diyelim ve Adres alanında bir ...]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-361" style="margin: 5px; float: left;" title="MySQL" src="http://www.osmanerdogan.com/wp-content/uploads/2009/01/4_mysql.jpg" alt="MySQL" width="190" height="143" />Benim sürekli favori listesinde bulunan ve genelde ihtiyacım olan bir SQL satırıdır, sürekli ihtiyaç duyduğum için bazen unutuyorum, bazen linki bulamıyorum sıkıldım bu durumdan o yüzden sık sık bloguma yazmaya karar verdim sık kullandığım yazıları.</p>
<p>Bunlardan birisi <a title="Mysql" href="/tag/mysql" target="_blank">MySQL</a> de toplu olarak metin/veri değişikliği:</p>
<p>Örneklemek gerekirse;</p>
<p>Müşterilerimiz tablosu var diyelim ve Adres alanında bir çok müşterimizin adresinde cadde ismi XYZ Caddesi olsun ve belediyemiz bu cadde ismini ABC Caddesi yaptı diyelim tek tek tüm verileri düzenlemek yerine bir SQL komutu ile phpMyadmin ve benzeri editörler ile tüm bilgileri değiştirebiliriz.</p>
<div class="igBar"><span id="lmysql-6"><a href="#" onclick="javascript:showPlainTxt('mysql-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">MySQL:</span>
<div id="mysql-6">
<div class="mysql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">UPDATE</span> musteriTablosu <span style="color: #993333; font-weight: bold;">SET</span> adresBilgisi =<span style="color: #993333; font-weight: bold;">REPLACE</span><span style="color: #66cc66;">&#40;</span>adresBilgisi, <span style="color: #ff0000;">'XYZ Caddesi'</span>,<span style="color: #ff0000;">'ABC Caddesi'</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Bu şekildeki bir SQL satırı ile işleminizi rahatlıkla gerçekleştirebilirsiniz.</p>

                            <div id="aspdf">
                                <a href="http://www.osmanerdogan.com/wp-content/plugins/as-pdf/generate.php?post=357">
                                    <span>Yazıyı PDF olarak İndir</span>
                                </a>
                            </div>
                        ]]></content:encoded>
			<wfw:commentRss>http://www.osmanerdogan.com/2009/01/22/mysqlde-butun-verilerde-toplu-yazi-degisikligi/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

