<?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>Interconnect IT - WordPress Consultants, Web Development and Web Design &#187; mySQL</title>
	<atom:link href="http://interconnectit.com/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://interconnectit.com</link>
	<description></description>
	<lastBuildDate>Mon, 21 May 2012 15:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Using MySQL Workbench with XAMPP</title>
		<link>http://interconnectit.com/764/using-mysql-workbench-with-xampp/</link>
		<comments>http://interconnectit.com/764/using-mysql-workbench-with-xampp/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 23:01:33 +0000</pubDate>
		<dc:creator>David Coveney</dc:creator>
				<category><![CDATA[mySQL]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Workbench]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://www.interconnectit.com/?p=764</guid>
		<description><![CDATA[This is a slight departure from our usual posts as it's not about WordPress.  However, if you're developing with WordPress on a Windows PC there's a good chance you're using XAMPP as your platform.
]]></description>
			<content:encoded><![CDATA[<p><!-- Start ScreenSteps Content --></p>
<div class="LessonContent">
<div class="LessonSummary">
<p><em><strong>Please Note, it&#8217;s been pointed out that I need to make it clear that this covers version 5.2, the developer release, of MySQL Workbench.  The principles still apply to 5.1, but it&#8217;s a different process that I&#8217;ve not documented at all.  Apologies for any confusion.</strong></em></p>
<p>This is a slight departure from our usual posts as it&#8217;s not about WordPress.  However, if you&#8217;re developing with WordPress on a Windows PC there&#8217;s a good chance you&#8217;re using XAMPP as your platform.</p>
<p>I always liked the MySQL Administrator and MySQL Query Browser tools, but these have recently been deprecated and will not be updated any more.<span id="more-764"></span> Instead, MySQL have released the MySQL Workbench, which is an all-in-one style DB tool that includes query browsing, database management and, interestingly, an entity relationship modeller.  The latter is useful if you&#8217;re designing databases.  In WordPress development you don&#8217;t do too much of that as it&#8217;s designed as a database light application.  A shame, because a better DB structure would really extend its power and reduce the frankly vast amount of code that&#8217;s invoked.  But that&#8217;s for another conversation!</p>
<p>Anyway, you&#8217;ll get the Workbench application and then find that it&#8217;s far harder to get going than the old tools.  But don&#8217;t be put off, once you work out a few simple steps you&#8217;ll be off.</p>
<p>It&#8217;s worth noting that this is as new to me as it is to you &#8211; there may be better ways to do this, and I&#8217;ve made certain assumptions about how you use XAMPP.  If you have any feedback, please comment below!</p></div>
<div class="LessonStep top">
<h3 class="StepTitle">Create a New Server Instance</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263421672264.png" alt="media_1263421672264.png" width="540" height="287" /></div>
<div class="StepInstructions">
<p>Start Workbench and you&#8217;ll be presented with a dashboard.  Select New Server Instance.</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Host machine is LocalHost</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263421812966.png" alt="media_1263421812966.png" width="540" height="186" /></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">OS is Windows</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263421896152.png" alt="media_1263421896152.png" width="540" height="284" /></div>
<div class="StepInstructions">
<p>You&#8217;ll need to check which version of MySQL you have installed &#8211; 5 or 5.1</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Don&#8217;t Worry About the Error</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263421950071.png" alt="media_1263421950071.png" width="540" height="181" /></div>
<div class="StepInstructions">
<p>XAMPP uses a .cnf file, not .ini  No idea why, just the way they&#8217;ve compiled it, I guess.  Remember, we&#8217;re not running MySQL from a standard build.  Just click next.</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Connection Values</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263422064481.png" alt="media_1263422064481.png" width="540" height="126" /></div>
<div class="StepInstructions">
<p>Click and Open Connection Manager</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Create a Connection Called localhost</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263422141981.png" alt="media_1263422141981.png" width="540" height="338" /></div>
<div class="StepInstructions">
<p>Assuming you have the default XAMPP for development purposes then you can use the settings exactly as above.  If you&#8217;ve assigned root a password you&#8217;ll need to completely the fields appropriately.  Click Test Connection to make sure all is well.  I like to use the Local Socket/Pipe, but you can use TCP/IP also.</p>
<p>The next step in the wizard will test the connection.  All should be well and if not you&#8217;ve made a mistake.</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Config File</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263422491464.png" alt="media_1263422491464.png" width="540" height="246" /></div>
<div class="StepInstructions">
<p>This is the first point where you deviate from &#8216;normal&#8217;.  If you click check path before setting it correctly, nothing will work.  So, you need to know where XAMPP is installed.  If it&#8217;s in the root of your T: drive as it is for our dev machines, then you need to enter the following path:  T:\xampp\mysql\bin\my.cnf  Change this according to where you placed XAMPP.  If you can&#8217;t work this path out, maybe you should try a different vocation?</p>
<p>Click Next</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Commands to Manage MySQL Server</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263422767403.png" alt="media_1263422767403.png" width="540" height="185" /></div>
<div class="StepInstructions">
<p>This is where it gets a little more fun.  The first two are quite easy to work out, but the third is quite different to the default.  Maybe there&#8217;s a better command, but it was the best I could think of at the time.</p>
<p>As you can see, the commands are:</p>
<pre><code>T:\xampp\mysql\bin\mysqld --defaults-file=T:\xampp\mysql\bin\my.cnf --standalone --console
T:\xampp\mysql\bin\mysqladmin --user=pma --password= shutdown
mysqladmin --user=pma --password= ping | findstr alive</code></pre>
<p>You may also want to run the commands in the context of administrator in many cases, but I don&#8217;t run on my machine as administrator (I&#8217;m security conscious) and don&#8217;t have the need to run these as admin, so it&#8217;s not strictly necessary to tick the box.  But for a development machine this isn&#8217;t a worry either way.</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">Name the Instance</h3>
<div class="StepImage"><img src="http://www.interconnectit.com/wp-content/uploads/2010/01/media_1263422882590.png" alt="media_1263422882590.png" width="540" height="95" /></div>
<div class="StepInstructions">
<p>Simples.</p>
<p>Finish off the wizard and you&#8217;ll have a new instance.  As long as you start MySQL in advance with XAMPP, it will work as expected.  Read the note below for more information on why.</p></div>
</div>
<div class="LessonStep top">
<h3 class="StepTitle">A Note About Starting and Stopping</h3>
<div class="StepInstructions">
<p>I have to admit that with the current settings I always start MySQL from the XAMPP control panel or shortcuts.  If I stop MySQL from the Workbench it can stop it, but it will never notice that it&#8217;s stopped.  This is less of an issue when you run MySQL as a service, and you can use the default commands given by the wizard, but running Apache and MySQL as a service can be a painful approach with XAMPP so few people bother.  If I can find time to work out a slicker approach, or you can tell me of one, then I&#8217;ll update this guide.</p>
<p>I hope this guide has been useful.  Thanks for reading!</p></div>
</div>
</div>
<p><!-- End ScreenSteps Content --></p>
]]></content:encoded>
			<wfw:commentRss>http://interconnectit.com/764/using-mysql-workbench-with-xampp/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>WordPress Database Corruption and its Effects</title>
		<link>http://interconnectit.com/117/wordpress-database-corruption-and-its-effects/</link>
		<comments>http://interconnectit.com/117/wordpress-database-corruption-and-its-effects/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 13:12:50 +0000</pubDate>
		<dc:creator>David Coveney</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[server crash]]></category>
		<category><![CDATA[taxonomy]]></category>

		<guid isPermaLink="false">http://liverpoolwebdesigner.wordpress.com/?p=117</guid>
		<description><![CDATA[We had an interesting failure recently. The server for one of our larger clients, who have their own high-spec dedicated server arranged, went down. We got the alert by text, and swung into action. Well, more accurately we had called the hosting providers and told them to fix it. They gave no solid reason or explanation as to why the&#8230; <a class="more" href="http://interconnectit.com/117/wordpress-database-corruption-and-its-effects/">continue reading <span class="unicode">&#8674;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_118" class="wp-caption alignleft" style="width:300px;"><a href="http://liverpoolwebdesigner.files.wordpress.com/2008/09/fireintheserver.jpg"><img class="size-medium wp-image-118" title="fireintheserver" src="http://liverpoolwebdesigner.files.wordpress.com/2008/09/fireintheserver.jpg?w=300" alt="You know that over-clocking experiment?" width="300" height="199" /></a><p class="wp-caption-text">You know that over-clocking experiment?</p></div>
<p>We had an interesting failure recently.  The server for one of our larger clients, who have their own high-spec dedicated server arranged, went down.  We got the alert by text, and swung into action.</p>
<p>Well, more accurately we had called the hosting providers and told them to fix it.</p>
<p>They gave no solid reason or explanation as to why the server had died, but within in an hour things were normal enough.</p>
<p><em>Or so we thought&#8230;</em></p>
<p><span id="more-117"></span></p>
<p>In fact, things in the background weren&#8217;t looking so great.  The hosting provision is rather off-hand.  Off the &#8220;here&#8217;s a box, now off you go lads!&#8221; variety.  It came with just an OS and an SSH connection.  Nothing, and I mean <strong>nothing</strong> was installed.  No fancy control panels here.  No web server even.  Or ftp.  You were expected to do it yourself.  Right down to compiling code.</p>
<p>So really, when they brought the database back up I should have known better.  They ran no checks.  They simply loaded the service and closed the ticket.</p>
<p>Unfortunately a few days later we started getting support calls from the users:</p>
<blockquote><p>We can&#8217;t see our categories or tags.</p></blockquote>
<blockquote><p>Publishing in advance never works.</p></blockquote>
<p>And then more alarmingly:</p>
<blockquote><p>One of the blogs has disappeared!</p></blockquote>
<p>The latter was a worry.  It was one of the most important blogs on this MU install.  It needed to be restored.</p>
<p>What I found was alarming &#8211; any attempt to look at wp_x_options for that blog in the admin panel caused an error.  PHP was throwing up errors everywhere.  But when I queried the table it looked fine.</p>
<p>In the end it was connecting with mySQL Administrator, a wonderful tool, and trying to do a backup before starting anything technical that revealed the true extent of the troubles.  And there it was &#8211; it couldn&#8217;t backup one table because it was completely corrupt.  Do a repair on it and &#8216;Hey presto!&#8217; fixed.</p>
<p>But that wasn&#8217;t the end of it.  The other problems still existed.  I thought that this rebuild would have been fine, but no.  The Administrator app didn&#8217;t find anything obvious, and when I looked in the taxonomy tables to see what was wrong all seemed fine &#8211; <em>if you did a select on just one table.</em></p>
<p>But if you ran a join, things fell apart and you received zero rows.  This time I decided to run an extended check on the whole database and found that of the 116 tables, five had indexes with link problems.  Now, if you don&#8217;t know, an index in a database is essentially a linked list &#8211; this is a fast way of allowing data to be added without having to shuffle things around too much.  Break a link and that index falls apart &#8211; especially on joins that need to find everything on a table.</p>
<p>So a repair against all affected tables and we were done.</p>
<p>If you get this kind of weird behaviour, especially after a crash, it can be well worth looking through the tables for problems like this.  Do make sure you know what you&#8217;re doing, however &#8211; mySQL Administrator is a powerful, quick and dangerous tool!</p>
]]></content:encoded>
			<wfw:commentRss>http://interconnectit.com/117/wordpress-database-corruption-and-its-effects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

