<?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>Pain Builds Character &#187; mysql</title>
	<atom:link href="http://www.mikemaxwell.net/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikemaxwell.net</link>
	<description>The official blog of Mike Maxwell... whatever that's worth!</description>
	<lastBuildDate>Tue, 28 Jul 2009 22:18:12 +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>WAMP and &quot;Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result&quot;</title>
		<link>http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/</link>
		<comments>http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 18:11:09 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/</guid>
		<description><![CDATA[This is the story of how one simple setting can waste valuable time. I was working on a project that involves some basic PHP and MySQL modifications. In order to do the development work and the testing, I used my local WAMP server installation. I downloaded the files and nailed down the most obvious environmental [...]]]></description>
			<content:encoded><![CDATA[<p>This is the story of how one simple setting can waste valuable time. I was working on a project that involves some basic PHP and MySQL modifications. In order to do the development work and the testing, I used my local WAMP server installation. </p>
<p>I downloaded the files and nailed down the most obvious environmental variables before even trying to run the client&#8217;s script in my local environment. No biggie &#8211; create a dupe of the database and the db user, make sure the script connects to my local instance of MySQL, etc. I knew the script should run since it worked well already in the client&#8217;s production environment.</p>
<p>Once the tweaking was done I gave it a try and immediately saw this error: </p>
<h5>Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result</h5>
<p>My first thought was that I&#8217;d missed something with the local variables because the actual line of code that PHP puked on looked fine. I tested the SQL query, ran through the code a few times and began to seriously worry about my competence. </p>
<p>But then I realized all of the PHP open tags were written in short form:</p>
<p>&#8212;</p>
<p>&lt;?</p>
<p>// various PHP code</p>
<p>?&gt;</p>
<p>&#8212;</p>
<p>By default, WAMP does not support the short open tag. All I had to do was enable that particular setting in WAMP&#8217;s PHP settings, and PRESTO: instant functionality.</p>
<p>I&#8217;ve read several forums where this error appeared for other developers, but none of the forums said anything that connected the PHP setting of short open tag support. Hopefully this will help somebody someday.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikemaxwell.net/2009/01/28/wamp-and-warning-mysql_fetch_array-supplied-argument-is-not-a-valid-mysql-result/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First MySQL Repair Job</title>
		<link>http://www.mikemaxwell.net/2008/12/03/my-first-mysql-repair-job/</link>
		<comments>http://www.mikemaxwell.net/2008/12/03/my-first-mysql-repair-job/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 23:26:59 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.mikemaxwell.net/2008/12/03/my-first-mysql-repair-job/</guid>
		<description><![CDATA[For some reason two of my MySQL databases required repair this week. Both were backing Joomla 1.5 installations &#8211; our corporate site (grownbypeople.com) and our old news website (informify.com), which we&#8217;ve left running. When browsing to the sites they both produced the same MySQL error #145. And it was the session table that was corrupted [...]]]></description>
			<content:encoded><![CDATA[<p>For some reason two of my MySQL databases required repair this week. Both were backing Joomla 1.5 installations &#8211; our corporate site (<a href="http://www.grownbypeople.com">grownbypeople.com</a>) and our old news website (<a href="http://www.informify.com" target="_blank">informify.com</a>), which we&#8217;ve left running.</p>
<p>When browsing to the sites they both produced the same MySQL error #145. And it was the session table that was corrupted on both DBs.</p>
<p>The first thing I thought of was some hack-bot going around exploiting some little-known Joomla vulnerability. But I haven&#8217;t been able to find anything about that on the Joomla site. Or elsewhere.</p>
<p>I then wondered if it was perhaps my hosting company, Hostmonster.com. The company president has a blog that sometimes explains strange new behavior in my hosting account. Sure enough there was <a href="http://mattheaton.com/?p=174" target="_blank">an entry</a> about changes they&#8217;ve been making that may well have had an impact. Turns out they&#8217;re switching their storage to Solid State Drives (SSDs). </p>
<p>But then I found a couple old Joomla threads indicating that Joomla has long suffered from periodically corrupted session tables.</p>
<p>Even if it does turn out to be a Joomla issue, why would they both happen pretty much on the same day? I&#8217;ve never seen it before.</p>
<p>If anyone has any ideas, feel free to let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikemaxwell.net/2008/12/03/my-first-mysql-repair-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoDaddy and Large SQL Imports</title>
		<link>http://www.mikemaxwell.net/2008/09/07/godaddy-and-large-sql-imports/</link>
		<comments>http://www.mikemaxwell.net/2008/09/07/godaddy-and-large-sql-imports/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 21:43:05 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.mikemaxwell.net/2008/09/07/godaddy-and-large-sql-imports/</guid>
		<description><![CDATA[One of my clients is a high school reunion organizer. She hires me to build and maintain the sites used for registering and other reunion-related stuff. These sites are built in Joomla 1.0.15 on Linux/MySQL servers. She uses GoDaddy for her hosting provider. I&#8217;m usually able to simply copy/paste the last site I made for [...]]]></description>
			<content:encoded><![CDATA[<p>One of my clients is a high school reunion organizer. She hires me to build and maintain the sites used for registering and other reunion-related stuff. These sites are built in Joomla 1.0.15 on Linux/MySQL servers. She uses GoDaddy for her hosting provider.</p>
<p>I&#8217;m usually able to simply copy/paste the last site I made for her and customize it for the new year and school. However, the last reunion site I did included a photo gallery. And, apparently, the extension I used to provide the photo gallery functionality stashed a bunch of images into the DB. </p>
<p>Which means, of course, when I went to copy the last site&#8217;s DB, the SQL file was rather large &#8211; 57 MB &#8211; much larger than GoDaddy will allow for importing into a new DB via phpMyAdmin.</p>
<p>GoDaddy tech support turned me on to this new technique. If you arrived here through a search on this subject, I hope it helps. I couldn&#8217;t find anything about it when I needed it.</p>
<p><strong>Note: This information is only relevant to people using GoDaddy hosting accounts who need to import a large SQL file. </strong>I also assume you know how to get around GoDaddy&#8217;s control panels.</p>
<ol>
<li>Dump the old database into a SQL file. If it&#8217;s less than 2 or 3 MB, you can probably just use phpMyAdmin for the import and skip all of what follows.</li>
<li>On the NEW hosting account, create a fresh MySQL DB using the tools GoDaddy provides.</li>
<li>After the setup of the DB is complete (takes several minutes), do a backup of the new DB. Yes, even though it&#8217;s empty.</li>
<li>Again, this will take a few minutes. While you&#8217;re waiting FTP the SQL file from the old DB into the _db_backups directory in your HTML directory.</li>
<li>Go back to your NEW DB, and do a restore. It will ask you which file you want to use. Use the big fat SQL file you just FTP&#8217;d to the new hosting account.</li>
<li>The new DB will be populated with the old DB&#8217;s content.</li>
</ol>
<p>If you found this page and used this workaround, let me know. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikemaxwell.net/2008/09/07/godaddy-and-large-sql-imports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
