<?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>The Thinking Lemur &#187; MySQL</title>
	<atom:link href="http://thinkinglemur.com/index.php/category/thinking/databases/mysql-databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://thinkinglemur.com</link>
	<description>from the mind of Donnie Bachan</description>
	<lastBuildDate>Sun, 11 Jul 2010 01:36:05 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>LOAD DATA INFILE and FILE Permissions on MySQL</title>
		<link>http://thinkinglemur.com/index.php/2009/06/load-data-infile-and-file-permissions-on-mysql/</link>
		<comments>http://thinkinglemur.com/index.php/2009/06/load-data-infile-and-file-permissions-on-mysql/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 13:27:18 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=234</guid>
		<description><![CDATA[I ran into an issue running the LOAD DATA INFILE command from a PHP script the other day. When I logged in as ROOT and executed the script on MySQL Query Browser it worked like a charm. However, when I executed the script from PHP as another use with only SELECT, INSERT, UPDATE and DELETE [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F06%2Fload-data-infile-and-file-permissions-on-mysql%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F06%2Fload-data-infile-and-file-permissions-on-mysql%2F" height="61" width="51" /></a></div><p>I ran into an issue running the LOAD DATA INFILE command from a PHP script the other day. When I logged in as ROOT and executed the script on MySQL Query Browser it worked like a charm. However, when I executed the script from PHP as another use with only SELECT, INSERT, UPDATE and DELETE premission the script failed saying the user does not have enough rights to perform the operation. According to the documentation if the client and server are on the same machine you use the LOAD DATA INFILE form to bulk insert data. However this requires that FILE permission be granted to the user, which is obviously a possible security risk. There does exists a simple work around to this however use the following form of the statement:</p>
<blockquote><p>LOAD DATA LOCAL INFILE &#8230;</p></blockquote>
<p>This form of the statement should be used when the client and server exists on different machines but works just as well if they are on the same machine and removes the need for the FILE permission.</p>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/06/load-data-infile-and-file-permissions-on-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Re-installation of MySQL 5.x</title>
		<link>http://thinkinglemur.com/index.php/2009/05/re-installation-of-mysql-5x/</link>
		<comments>http://thinkinglemur.com/index.php/2009/05/re-installation-of-mysql-5x/#comments</comments>
		<pubDate>Wed, 06 May 2009 13:20:28 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=230</guid>
		<description><![CDATA[A friend of mine recently had an issue while installing MySQL 5.1.34 on a Windows 2003 R2 system using the binary installer. All seemed to have gone well with the install except that when it was done he couldn&#8217;t log into the database as root. Obviously, we thought that the password was wrong, so we [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F05%2Fre-installation-of-mysql-5x%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F05%2Fre-installation-of-mysql-5x%2F" height="61" width="51" /></a></div><p>A friend of mine recently had an issue while installing MySQL 5.1.34 on a Windows 2003 R2 system using the binary installer. All seemed to have gone well with the install except that when it was done he couldn&#8217;t log into the database as root. Obviously, we thought that the password was wrong, so we tried to reset it using mysqladmin using the command:</p>
<blockquote><p>c:\&gt; mysqladmin -u root flush-privileges password &lt;new-password&gt;</p></blockquote>
<p>However this did not work, even after restarting with the &#8211;skip-grant-tables option set. So the next course of action was to re-install. The current installation was removed using the uninstall option and the mySQL folder created on the C:\Program Files folder was junked. </p>
<p>The re-install started with no problems but curiously remembered all the previous settings (sign of problems to come!). The install completed but configuration failed with the wizard unable to apply security settings because the password was incorrect. Apparently it seems that the password is stored somewhere that was not removed in the previous uninstall.</p>
<p>In the end the following steps worked for completely removing and re-installing:</p>
<ol>
<li>Perform un-install using wizard</li>
<li>Manually remove the service if still installed</li>
<li>Delete folder C:\Program Files\MySQL</li>
<li>Delete C:\Windows\my.ini</li>
<li>Delete the MySQL folder in Application Data. The actual Application Data folder will depend on the user performing the installation</li>
<li>Re-install</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/05/re-installation-of-mysql-5x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5 timestamp error in ColdFusion 8</title>
		<link>http://thinkinglemur.com/index.php/2009/02/mysql-5-timestamp-error-in-coldfusion-8/</link>
		<comments>http://thinkinglemur.com/index.php/2009/02/mysql-5-timestamp-error-in-coldfusion-8/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 23:55:02 +0000</pubDate>
		<dc:creator>Donnie Bachan</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://thinkinglemur.com/?p=124</guid>
		<description><![CDATA[Scenario:
Query grabs user data from MySQL 5 database using the built in MySQL 4/5 driver in ColdFusion 8 on a Windows 2003 Server.
 
Problem:
Cannot convert value &#8216;0000-00-00 00:00:00&#8242; from column 10 to TIMESTAMP error returned on execution.
 
Analysis:
After a quick search on Google, it appears that the default behaviour for the Connector J MySQL driver is to [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Fmysql-5-timestamp-error-in-coldfusion-8%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fthinkinglemur.com%2Findex.php%2F2009%2F02%2Fmysql-5-timestamp-error-in-coldfusion-8%2F" height="61" width="51" /></a></div><p><strong>Scenario:</strong></p>
<p>Query grabs user data from MySQL 5 database using the built in MySQL 4/5 driver in ColdFusion 8 on a Windows 2003 Server.</p>
<p> </p>
<p><strong>Problem:</strong></p>
<p>Cannot convert value &#8216;0000-00-00 00:00:00&#8242; from column 10 to TIMESTAMP error returned on execution.</p>
<p> </p>
<p><strong>Analysis:</strong></p>
<p>After a quick search on Google, it appears that the default behaviour for the Connector J MySQL driver is to not allow zero date values. A specific value must be included in the connect string to overide this value.</p>
<p> </p>
<p><strong>Resolution:</strong></p>
<p>Include the zeroDateTimeBehavior=convertToNull value in the connect string. In ColdFusion the instructions are:</p>
<p> </p>
<ul>
<li>Go to Data Sources in the ColdFusion Administrator</li>
<li>Select the MySQL 4/5 datasource and click the Show Advanced Settings button</li>
<li>In the Connect String box append the following: zeroDateTimeBehavior=convertToNull </li>
</ul>
<p>Note: if there is already a connect string add an ampersand to the end of the existing string before adding the new value. For example if the connect string was set to:</p>
<blockquote><p>useUnicode=true&amp;characterEncoding=iso-8859-1</p></blockquote>
<p>The new string would look like:</p>
<blockquote><p>useUnicode=true&amp;characterEncoding=iso-8859-1&amp;zeroDateTimeBehavior=convertToNull</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://thinkinglemur.com/index.php/2009/02/mysql-5-timestamp-error-in-coldfusion-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
