<?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>TechTrouts.com &#187; mysql</title>
	<atom:link href="http://techtrouts.com/topics/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtrouts.com</link>
	<description>Doin' the dev dance o/</description>
	<lastBuildDate>Thu, 23 Jul 2009 10:42:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using MySQL Stored Procedures in PHP ( MySQL error #1312 )</title>
		<link>http://techtrouts.com/using-mysql-stored-procedures-in-php/</link>
		<comments>http://techtrouts.com/using-mysql-stored-procedures-in-php/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 11:31:32 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techtrouts.com/using-mysql-stored-procedures-in-php/</guid>
		<description><![CDATA[Hello again, in order to use Stored Procedures in MySQL through PHP you usually either use pdo or mysqli connections. However if do not wish to redo your application connections and you don&#8217;t require any out parameters you can use &#8220;mysql_connect($host, $user, $password, true, 65536);&#8221; on connection, using the 65536 ( CLIENT_MULTI_STATEMENTS ) internal magic [...]]]></description>
			<content:encoded><![CDATA[<p>Hello again,</p>
<p>in order to use Stored Procedures in MySQL through PHP you usually either use <em>pdo</em> or <em>mysqli</em> connections.<br />
However if do not wish to redo your application connections and you don&#8217;t require any out parameters you can use &#8220;mysql_connect($host, $user, $password, true, 65536);&#8221; on connection, using the <em>65536</em> ( <code>CLIENT_MULTI_STATEMENTS</code> ) internal magic constant. But you can make only one stored procedure call per connection, and there is no support for <code>OUT</code> parameters. It is not currently documented, but can be found in the php header file.</p>
<p>If you do not use this connection method, you&#8217;ll get a  &#8220;#1312 &#8211; PROCEDURE <em>database</em>.<em>procedure</em> can&#8217;t return a result set in the given context&#8221; error whenever you CALL a procedure that returns a result set.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/using-mysql-stored-procedures-in-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySQL 5 Storage Engines: MyISAM, MRG_MyISAM and InnoDB</title>
		<link>http://techtrouts.com/mysql-5-storage-engines-myisam-mrg_myisam-and-innodb/</link>
		<comments>http://techtrouts.com/mysql-5-storage-engines-myisam-mrg_myisam-and-innodb/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 17:32:21 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://techtrouts.com/mysql-5-storage-engines-myisam-mrg_myisam-and-innodb/</guid>
		<description><![CDATA[I&#8217;ve been around choosing the appropriate Storage Engine for fallforward&#8217;s development, and so i&#8217;m posting some tips on Storage Engines for MySQL 5. Storage engines differ essencially in how they organize the data, indexes, caching, etc. The pratical results are different possibilities in data organization and restrictions (foreign keys, constraints, triggers (on delete, on update), [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been around choosing the appropriate Storage Engine for fallforward&#8217;s development, and so i&#8217;m posting some tips on Storage Engines for MySQL 5.</p>
<p>Storage engines differ essencially in how they organize the data, indexes, caching, etc.<br />
The pratical results are different possibilities in data organization and restrictions (foreign keys, constraints, triggers (on delete, on update), etc) as well as different performance capabilities.</p>
<h4>Technical Differences: </h4>
<p>MyISAM is designed to be a simple and effective storage engine, ideal for small websites, blogs, etc. Doesn&#8217;t require much technical knowledge and get&#8217;s the work done. It also features full-text index, allowing you to take advantage of the very useful &#8220;MATCH col AGAINT(&#8216;needle&#8217;)&#8221; text search clause.</p>
<p>MRG_MyISAM is treated as MyISAM but can be &#8220;shared&#8221; among different databases &#8211; very useful for main tables in multiple-database applications, as long as your working on the same MySQL server.</p>
<p>InnoDB is designed to be more of a storage engine for applications. It features foreign keys, triggers, etc &#8211; essential for multi-million rows and organizational data.</p>
<h4>Performance:</h4>
<p>A few years back MyISAM would kick ass on SELECT clauses, whereas InnoDB was usually better for heavy INSERT / UPDATE and DELETE clauses.<br />
These days InnoDB can be even faster than MyISAM for SELECT clauses.</p>
<p>Though MyISAM can be much faster for a simple &#8220;SELECT count(*) from table&#8221; query as it caches the amount of rows on a table, they work more or less the same when you use the &#8220;where some_col=&#8217;some_val&#8217;&#8221; clause. On the other hand text searching on full-text index kicks ass over any &#8220;LIKE &#8216;%needle%&#8217; &#8221; clause.</p>
<p>MRG_MyISAM is pretty much like MyISAM, though it can usually get a little bit slower due to multiple database usage and locking.</p>
<p>All in all InnoDB has come a long way these past few years, and has become my first choice for applications, though i still use separate MyISAM tables for full-text searching on text fields.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/mysql-5-storage-engines-myisam-mrg_myisam-and-innodb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mac &#8211; mysql does not connect on localhost but connect&#8217;s on 127.0.0.1</title>
		<link>http://techtrouts.com/mac-mysql-does-not-connect-on-localhost-but-connects-on-127001/</link>
		<comments>http://techtrouts.com/mac-mysql-does-not-connect-on-localhost-but-connects-on-127001/#comments</comments>
		<pubDate>Mon, 26 May 2008 11:23:56 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[how-tos]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://techtrouts.com/mac-mysql-does-not-connect-on-localhost-but-connects-on-127001/</guid>
		<description><![CDATA[Hi, this issue came to me after i got &#8220;Can&#8217;t connect to local MySQL server through socket &#8216;/var/mysql/mysql.sock&#8217;&#8221; on a mysql connection on php on a fresh installed mac &#8211; php connect&#8217;s correctly to 127.0.0.1 , but does not connect to localhost . On a mac the default mysql socket is &#8216;/private/tmp/mysql.sock&#8216; and not &#8216;/var/mysql/mysql.sock&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>this issue came to me after i got &#8220;<em>Can&#8217;t connect to local MySQL server through socket &#8216;/var/mysql/mysql.sock&#8217;</em>&#8221; on a mysql connection on php on a fresh installed mac &#8211; php connect&#8217;s correctly to <em>127.0.0.1</em> , but does not connect to <em>localhost</em> .</p>
<p>On a mac the default mysql socket is  &#8216;<em>/private/tmp/mysql.sock</em>&#8216; and not <em>&#8216;/var/mysql/mysql.sock&#8217;</em>, you can confirm it by using <strong>$ locate mysql.sock</strong> on a Terminal.</p>
<p>So basically you have to change the php default connection socket to mysql to &#8216;<em>/private/tmp/mysql.sock</em>&#8216; . To do this you have to edit your php.ini &#8211; probably located at &#8216;<em>/private/etc/php.ini</em>&#8216; &#8211; via:</p>
<ul>
<li><strong>$ sudo nano /private/etc/php.ini</strong></li>
<li><strong>ctrl+w</strong> (where is) &#8220;<em>mysql.default_socket</em>&#8220;</li>
<li>alter to &#8220;mysql.default_socket = /private/tmp/mysql.sock&#8221;</li>
<li><strong>crtl+x</strong> followed by <strong>y</strong> and <strong>enter</strong> to save php.ini</li>
<li><strong>$ sudo httpd -k restart</strong> to restart Apache 2</li>
</ul>
<p>Retry connecting to mysql localhost on php &#8211; should be working :)</p>
<p>Update:<br />
if you use mysqli you also must set &#8220;mysqli.default_socket  = /private/tmp/mysql.sock&#8221; on php.ini;</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/mac-mysql-does-not-connect-on-localhost-but-connects-on-127001/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
