<?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>Andrew Mallis&#039; blog &#187; MySQL</title>
	<atom:link href="http://andrewmallis.com/blog/tag/mysql/feed" rel="self" type="application/rss+xml" />
	<link>http://andrewmallis.com/blog</link>
	<description>this is the personal blog for Andrew Mallis</description>
	<lastBuildDate>Sat, 19 Nov 2011 09:39:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>how to back up databases using phpMyAdmin</title>
		<link>http://andrewmallis.com/blog/2009/06/02/how-to-back-up-databases-using-phpmyadmin</link>
		<comments>http://andrewmallis.com/blog/2009/06/02/how-to-back-up-databases-using-phpmyadmin#comments</comments>
		<pubDate>Wed, 03 Jun 2009 01:04:30 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[drupal]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[tech tips]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpMyAdmin]]></category>

		<guid isPermaLink="false">http://andrewmallis.com/blog/?p=234</guid>
		<description><![CDATA[Back ups are important. Like brushing your teeth, it&#8217;s something you should do routinely. And, as you&#8217;d brush before important events, like going out on a date, so should you too backup before upgrading software. I&#8217;m going to show you how to use phpMyAdmin to back up and restore MySQL databases. In my next post, [...]]]></description>
			<content:encoded><![CDATA[<p><span id="sample-permalink">Back ups are important. Like brushing your teeth, it&#8217;s something you should do routinely. And, as</span><span id="sample-permalink"> you&#8217;d brush before important events, like going out on a date, so should you too backup before upgrading </span>software.</p>
<p>I&#8217;m going to show you how to use <a href="http://www.phpmyadmin.net" target="_blank" class="liexternal">phpMyAdmin</a> to back up and restore MySQL databases. In my next post, I&#8217;ll show you how to graduate to doing the same thing using the command line.</p>
<p>I use <a href="http://www.mamp.info/" target="_blank" class="liexternal">MAMP</a> to develop websites locally. I&#8217;ve written about this before <a href="http://andrewmallis.com/blog/2007/11/03/mamp-and-xamp" class="liinternal">here</a>. The examples I&#8217;ll be showing come from the phpMyAdmin packaged with MAMP, but apply just as well to any other environment.<span id="more-234"></span></p>
<h2>phpMyAdmin without the MAMP frame</h2>
<p style="text-align: left;">First things first. Let&#8217;s  work so we can see what we&#8217;re doing.I&#8217;m going to assume that you&#8217;re able to download and install MAMP or MAMP Pro on your own. The phpMyAdmin URL that you from the MAMP default webstart page gets you to the URL:</p>
<p style="text-align: left;"><a href="http://localhost/MAMP/frame.php?src=%2FphpMyAdmin%2F%3Flang%3Den-iso-8859-1&amp;language=English" target="_blank" class="liexternal">http://localhost/MAMP/frame.php?src=%2FphpMyAdmin%2F%3Flang%3Den-iso-8859-1&amp;language=English</a></p>
<p>which looks gives you a framed version of the phpMyAdmin. The framing takes up a lot of screen real estate.</p>
<p style="text-align: center;"><a href="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_noframe-250x201.png" class="liimagelink"><img class="size-full wp-image-239 aligncenter" title="phpmyadmin_mampframe" src="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_mampframe-250x201.png" alt="phpMyAdmin widow with the MAMP framing" width="250" height="201" /></a></p>
<p>Instead, use <a href="http://localhost/phpMyAdmin" target="_blank" class="liexternal">http://localhost/phpMyAdmin</a> and you&#8217;ll get something that looks much more pleasing:</p>
<p style="text-align: center;"><a href="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_noframe-250x201.png" class="liimagelink"><img class="size-full wp-image-238 aligncenter" title="phpmyadmin_noframe" src="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_noframe-250x201.png" alt="phpMyAdmin window without a frame" width="250" height="201" /></a></p>
<h2>dumping a database with phpMyAdmin</h2>
<p>Select a database from the drop-down menu on the left hand side of phpMyAdmin. Or, Navigate to &#8220;home&#8221; by clicking the little house under the phpMyAdmin logo in the top left and hit the blue Databases link in the  longish list there.<a href="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_home.png" class="liinternal"></a></p>
<p style="text-align: center;"><a href="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_home.png" class="liimagelink"><img class="size-full wp-image-245 aligncenter" title="phpmyadmin_home" src="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_home-250x182.png" alt="phpmyadmin_home" width="250" height="182" /></a></p>
<p>Ok, so now we see the tables in our database. Press the Export tab at the top. We&#8217;re going to export this database.</p>
<p style="text-align: center;"><a href="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_table-250x214.png" class="liimagelink"><img class="aligncenter size-full wp-image-253" title="phpmyadmin_table" src="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin_table-250x214.png" alt="phpmyadmin_table" width="250" height="214" /></a></p>
<p>Let&#8217;s review the options you should select to get nice, compact, and legible SQL.</p>
<p style="text-align: center;"><a href="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin2102_exportdb3-600x632.png" class="liimagelink"><img class="aligncenter size-full wp-image-252" title="phpmyadmin2102_exportdb3" src="http://andrewmallis.com/blog/wp-content/uploads/2009/06/phpmyadmin2102_exportdb3-600x632.png" alt="phpmyadmin2102_exportdb3" width="600" height="632" /></a></p>
<p>The first column, in the Export fieldset, is pretty straight forward. By default all the tables in your database will be selected. SQL is the format you want too.</p>
<p>&#8220;Disable foreign key checks&#8221; isn&#8217;t always necessary. I do a lot of CiviCRM work. Restoring a CiviCRM database will fail unless this option is enabled in your export.</p>
<p>&#8220;Add DROP TABLE / DROP VIEW&#8221; will delete your table on import before recreating it.</p>
<p>Extended inserts and Complete insterts gives you a smaller file and more compacted, easy to read view.</p>
<p>Click &#8220;Save as file&#8221; and use &#8220;gzipped&#8221; compression for the smallest files.</p>
<p>In the File name template, I add %D, which spits out today&#8217;s date. I add a little hypen before to seperate it from the database name and MAMP after, so I know it was a local dump and not from my live server. This format would give me a file like: mysql-06_02_09_MAMP.sql.gz</p>
<p>To restore your databse, click on the import tab, click the browse button, select your file, press go. I&#8217;ll spare you the screenshot.</p>
<div id="bppostbookmarks"><a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2009%2F06%2F02%2Fhow-to-back-up-databases-using-phpmyadmin&t=how+to+back+up+databases+using+phpMyAdmin" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/yahoo-icon.png" alt="Add to Yahoo" title="Add to Yahoo" /></a> <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2009%2F06%2F02%2Fhow-to-back-up-databases-using-phpmyadmin&title=how+to+back+up+databases+using+phpMyAdmin" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/g-icon.png" alt="Add to Google" title="Add to Google" /></a> <a href="http://del.icio.us/post?&url=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2009%2F06%2F02%2Fhow-to-back-up-databases-using-phpmyadmin&title=how+to+back+up+databases+using+phpMyAdmin" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/delicious-icon.png" alt="Save to Del.icio.us" title="Save to Del.icio.us" /></a> <a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2009%2F06%2F02%2Fhow-to-back-up-databases-using-phpmyadmin&title=how+to+back+up+databases+using+phpMyAdmin&bodytext=&topic=" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/digg-icon.png" alt="Digg IT!" title="Digg IT!" /></a> <a href="https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2009%2F06%2F02%2Fhow-to-back-up-databases-using-phpmyadmin&title=how+to+back+up+databases+using+phpMyAdmin&top=1" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/live-icon.gif" alt="Live Bookmarks!" title="Live Bookmarks!" /></a> </div>]]></content:encoded>
			<wfw:commentRss>http://andrewmallis.com/blog/2009/06/02/how-to-back-up-databases-using-phpmyadmin/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>MAMP and XAMP</title>
		<link>http://andrewmallis.com/blog/2007/11/03/mamp-and-xamp</link>
		<comments>http://andrewmallis.com/blog/2007/11/03/mamp-and-xamp#comments</comments>
		<pubDate>Sat, 03 Nov 2007 19:04:54 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[tech tips]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MAMP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WAMP]]></category>
		<category><![CDATA[webserving]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://andrewmallis.com/blog/2007/11/03/mamp-and-xamp</guid>
		<description><![CDATA[Running a test server has never been easier than with the advent stand-alone Apache distribution packages. If you&#8217;re interested in mucking about in Open Source software package distributions (see my previous post, How to Be Your own Webmaster) or even a hard-core developer the fastest, and safest, way to roll a project out is to [...]]]></description>
			<content:encoded><![CDATA[<p>Running a test server has never been easier than with the advent stand-alone Apache distribution packages. If you&#8217;re interested in mucking about in Open Source software package distributions (see my previous post, <a href="http://andrewmallis.com/blog/2007/10/19/how-to-be-your-own-webmaster" class="liinternal">How to Be Your own Webmaster</a>) or even a hard-core developer the fastest, and safest, way to roll a project out is to work on it locally, then push it live. Working with your files on your local machine, versus going back and forth with FTP will keep you more organized, and working faster. For one, you won&#8217;t (as easily) bring your live site down if you do something wrong, because you&#8217;re testing it out first. Second, downloading and uploading is tedious and error-prone: which is the right file and where does it go again?</p>
<p><a href="http://www.mamp.info/en/index.php" target="_blank" class="liexternal">MAMP</a> stands for Macintosh-Apache-MySQL-PHP and is a software package that lets you run the AMP parts on your M part without the hassle of installing them all separately – and yes, it can be quite a hassle to install all the parts, or even impossible if you don&#8217;t know what you&#8217;re doing.</p>
<p><a href="http://www.wampserver.com/en/" target="_blank" class="liexternal">WAMP</a> is still AMP but for W – Windows. I can also recommend <a href="http://www.apachefriends.org/en/xampp.html" target="_blank" class="liexternal">XAMPP</a> (the extra P is for Perl) which runs on Windows, Mac, Linux and Solaris (I&#8217;ve seen more movies by this name than users) – it also has great integration with <a href="http://www.eclipse.org/" target="_blank" class="liexternal">Eclipse</a>, if you use that IDE.</p>
<p>There are a couple of really great video tutorials on Lullabot that show you how to install <a href="http://www.lullabot.com/videocast/install_local_web_server_mac_osx" target="_blank" class="liexternal">MAMP on Mac OS X </a>and <a href="http://www.lullabot.com/videocast/install-local-web-server-windows-xp" target="_blank" class="liexternal">WAMP on Windows XP</a>. Click on the view or download tab there. It&#8217;ll walk you through things and hold your hand all the way.</p>
<p>Go ahead, download a package, it&#8217;s really painless and easy.</p>
<p>UPDATE: It seems to me that WAMP, upon further examination, is less flexible than <a href="http://www.apachefriends.org/en/xampp.html" target="_blank" class="liexternal">XAMPP</a>. I&#8217;d only advocated WAMP because there was a video tutorial of it, but save yourself a headache and go for <a href="http://www.apachefriends.org/en/xampp.html" target="_blank" class="liexternal">XAMPP</a> instead.</p>
<div id="bppostbookmarks"><a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2007%2F11%2F03%2Fmamp-and-xamp&t=MAMP+and+XAMP" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/yahoo-icon.png" alt="Add to Yahoo" title="Add to Yahoo" /></a> <a href="http://www.google.com/bookmarks/mark?op=add&bkmk=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2007%2F11%2F03%2Fmamp-and-xamp&title=MAMP+and+XAMP" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/g-icon.png" alt="Add to Google" title="Add to Google" /></a> <a href="http://del.icio.us/post?&url=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2007%2F11%2F03%2Fmamp-and-xamp&title=MAMP+and+XAMP" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/delicious-icon.png" alt="Save to Del.icio.us" title="Save to Del.icio.us" /></a> <a href="http://digg.com/submit?phase=2&url=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2007%2F11%2F03%2Fmamp-and-xamp&title=MAMP+and+XAMP&bodytext=&topic=" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/digg-icon.png" alt="Digg IT!" title="Digg IT!" /></a> <a href="https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url=http%3A%2F%2Fandrewmallis.com%2Fblog%2F2007%2F11%2F03%2Fmamp-and-xamp&title=MAMP+and+XAMP&top=1" target="_blank" class="liimagelink"><img src="http://andrewmallis.com/blog/wp-content/plugins/bp-bookmarks/images/live-icon.gif" alt="Live Bookmarks!" title="Live Bookmarks!" /></a> </div>]]></content:encoded>
			<wfw:commentRss>http://andrewmallis.com/blog/2007/11/03/mamp-and-xamp/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

