<?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>What I like! &#187; MySQL</title>
	<atom:link href="http://kelvinmedina.com/blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://kelvinmedina.com/blog</link>
	<description>kelvinmedina.com</description>
	<lastBuildDate>Wed, 02 Dec 2009 22:50:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Aumentar el tamaño minimo de palabra en MySQL (Increase Minimum Word Length in MySQL)</title>
		<link>http://kelvinmedina.com/blog/2009/07/aumentar-el-tamano-minimo-de-palabra-en-mysql-increase-minimum-word-length-in-mysql/</link>
		<comments>http://kelvinmedina.com/blog/2009/07/aumentar-el-tamano-minimo-de-palabra-en-mysql-increase-minimum-word-length-in-mysql/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 20:21:22 +0000</pubDate>
		<dc:creator>Kelvin</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://kelvinmedina.com/blog/?p=223</guid>
		<description><![CDATA[Estoy implementando un buscador con PHP en donde utilizo "Boolean Full-Text Searches".  Una vez  "terminada" la parte de programacion era hora de probar el buscador.  Hay es cuando noto que no obtengo resultados cuando escribo palabras que sean menores de 4 caracteres.  La razon es que por defecto "default " MySQL establece un limite en [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_156" class="wp-caption alignleft" style="width: 310px"><img class="size-medium wp-image-156" title="logo-mysql" src="http://kelvinmedina.com/blog/wp-content/uploads/2009/07/logo-mysql-300x218.jpg" alt="Logo MySQL" width="300" height="218" /><p class="wp-caption-text">Logo MySQL</p></div>
<p>Estoy implementando un buscador con PHP en donde utilizo "Boolean Full-Text Searches".  Una vez  "terminada" la parte de programacion era hora de probar el buscador.  Hay es cuando noto que no obtengo resultados cuando escribo palabras que sean menores de 4 caracteres.  La razon es que por defecto "default " MySQL establece un limite en las palabras de 4 caracteres.  En mi caso necesitaba que el buscador fuera capaz de buscar palabras de al menos 3 caracteres.</p>
<p><strong>Para resolver ese asunto podemos hacer lo siguente:</strong></p>
<p>* Debes tener al menos una version de MySQL 4.x.x<br />
* En Windows buscar el archivo my.ini<br />
* En Unix buscar el archivo my.cnf<br />
* Añadir lo siguente:</p>
<div class="igBar"><span id="lcode-3"><a href="#" onclick="javascript:showPlainTxt('code-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-3">
<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;">#<span style="color:#006600; font-weight:bold;">&#91;</span>mysqld<span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</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;">ft_min_word_len=<span style="color:#800000;color:#800000;">3</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para que el cambio aplique debes reiniciar tu servidor de MySQL, entonces reconstruir tu tablas en la base de datos.<br />
Lo cual lo puedes hacer con un "dropping" y recrear las tablas que contienen las "full text columns" (primero debes hacer un backup)  o con el siguiente comando con el cual resulta todo mas sencillo:</p>
<div class="igBar"><span id="lsql-4"><a href="#" onclick="javascript:showPlainTxt('sql-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-4">
<div class="sql">
<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;">REPAIR <span style="color: #993333; font-weight: bold;">TABLE</span> table_name QUICK; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://kelvinmedina.com/blog/2009/07/aumentar-el-tamano-minimo-de-palabra-en-mysql-increase-minimum-word-length-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error #1005 &#8211; Can&#8217;t create table&#8230; en MySQL al intentar crear una relacion 1-M</title>
		<link>http://kelvinmedina.com/blog/2009/07/error-1005-cant-create-table-en-mysql-al-intentar-crear-una-relacion-1-m/</link>
		<comments>http://kelvinmedina.com/blog/2009/07/error-1005-cant-create-table-en-mysql-al-intentar-crear-una-relacion-1-m/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 23:45:58 +0000</pubDate>
		<dc:creator>Kelvin</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[relaciones]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://kelvinmedina.com/blog/?p=150</guid>
		<description><![CDATA[Estaba intentando hacer una relacion (unos a muchos 1-M) en una base de datos en MySQL ya existente  y recibia este error: #1005 - Can't create table 'table_name.#sql-344_126' (errno: 121)
La razon es que tenia varios asuntos sin resolver:
El campo a ser utilizado en la relacion tiene que ser llave primaria o indice (primary key or [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_156" class="wp-caption alignleft" style="width: 286px"><img class="size-medium wp-image-156" title="logo-mysql" src="http://kelvinmedina.com/blog/wp-content/uploads/2009/07/logo-mysql-300x218.jpg" alt="Logo MySQL" width="276" height="200" /><p class="wp-caption-text">Logo MySQL</p></div>
<p>Estaba intentando hacer una relacion (unos a muchos 1-M) en una base de datos en MySQL ya existente  y recibia este error: #1005 - Can't create table 'table_name.#sql-344_126' (errno: 121)</p>
<p><strong>La razon es que tenia varios asuntos sin resolver:</strong></p>
<p style="padding-left: 30px;">El campo a ser utilizado en la relacion tiene que ser llave primaria o indice (primary key or index).</p>
<p>Ambas tablas tienen que ser Engine InnoDB, para modificar una tabla existente puedes utilizar el siguente commando:</p>
<div class="igBar"><span id="lsql-7"><a href="#" onclick="javascript:showPlainTxt('sql-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-7">
<div class="sql">
<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;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">'table_name'</span> ENGINE = InnoDB; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Para alterar una tabla ya existente, creando asi la relacion:</p>
<div class="igBar"><span id="lsql-8"><a href="#" onclick="javascript:showPlainTxt('sql-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">SQL:</span>
<div id="sql-8">
<div class="sql">
<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;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> usuarios</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">ADD</span> CONSTRAINT country_id</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;"><span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color:#006600; font-weight:bold;">&#40;</span>country_id<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">REFERENCES</span> countries <span style="color:#006600; font-weight:bold;">&#40;</span>country_id<span style="color:#006600; font-weight:bold;">&#41;</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;"><span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">DELETE</span> CASCADE <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">UPDATE</span> CASCADE </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Pueden conseguir mas informacion en este blog: <a title="MySQL Error Number 1005 Can’t create table ‘.\mydb\#sql-328_45.frm’ (errno: 150)" href="http://www.verysimple.com/blog/2006/10/22/mysql-error-number-1005-cant-create-table-mydbsql-328_45frm-errno-150/" target="blank">MySQL Error Number 1005 Can’t create table ‘.\mydb\#sql-328_45.frm’ (errno: 150)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kelvinmedina.com/blog/2009/07/error-1005-cant-create-table-en-mysql-al-intentar-crear-una-relacion-1-m/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
