<?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>Rudolf Maduro - Life Coach &#187; MySQL</title>
	<atom:link href="http://www.rudolfmaduro.com/category/english/debian-lenny/mysql-debian-lenny-english/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rudolfmaduro.com</link>
	<description>Get a taste of Life with Online Life Coach Rudolf Maduro</description>
	<lastBuildDate>Fri, 16 Dec 2011 15:54:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<div style="float:right; padding-bottom:10px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9572787728013152";
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = "250x250_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "241a12";
google_color_bg = "241a12";
google_color_link = "585d8b";
google_color_url = "585d8b";
google_color_text = "333000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>	<item>
		<title>Extracting one Database From a full mysqldump File</title>
		<link>http://www.rudolfmaduro.com/2010/05/06/extracting-one-database-from-a-full-mysqldump-file/</link>
		<comments>http://www.rudolfmaduro.com/2010/05/06/extracting-one-database-from-a-full-mysqldump-file/#comments</comments>
		<pubDate>Thu, 06 May 2010 07:23:02 +0000</pubDate>
		<dc:creator>Rudolf</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Extracting one Database]]></category>
		<category><![CDATA[from a full mysqldump]]></category>

		<guid isPermaLink="false">http://www.rudolfmaduro.com/?p=111</guid>
		<description><![CDATA[Extracting one Database From a full mysqldump File Normal system administrators make a full database dump as a safety guard against server or disk failure with the following command: shell&#62;mysqldump -e -u root &#8211;password=securepasswd &#8211;all-databases &#62; fulldump.sql The idea behind a full dump, when recovering from a crash it is easy to recover all databases [...]]]></description>
			<content:encoded><![CDATA[<h1><strong>Extracting one Database From a full mysqldump File</strong></h1>
<p>Normal system administrators make a full database dump as a safety guard against server or disk failure with the following command:<br />
<em><br />
<strong>shell&gt;mysqldump -e -u root &#8211;password=securepasswd &#8211;all-databases &gt; fulldump.sql</strong></em></p>
<p>The idea behind a full dump, when recovering from a crash it is easy to recover all databases in one go. You can restore all databases with a single command (watch out do not use this command on a live databaseserver it will <strong>overwrite all</strong> existing databases and tables):<br />
<strong><em><br />
shell&gt; mysql -u root -p securepassword database_name &lt; fulldump.sql</em></strong></p>
<p>If you want to recover online ONE single database from a full dump file use the following command with the &#8211;one-database flag!</p>
<p><em><strong>mysql&gt; mysql -u root -p &#8211;one-database testdb &lt; fullserverdump.sql</strong></em></p>
<p>If you don’t want to restore the database, but you only want to extract the database testdb out of the full dump file you can do this with sed:</p>
<p><em><strong>shell&gt; sed -n &#8216;/^&#8211; Current Database: `test`/,/^&#8211; Current Database: `/p&#8217; fulldump.sql &gt; test.sql</strong></em></p>
<p>if the above does not work (older mysql versions) try:</p>
<p><em><strong>shell&gt; sed -n &#8216;/^&#8211; Current Database: test/,/^&#8211; Current Database: /p&#8217; fulldump.sql &gt; test.sql</strong></em></p>
<p>&#8220;You just need to change “testdb” to be the name of the database you want extracted.﻿&#8221;</p>
<p>Rudolf Maduro &#8211; Life Coach and IT specialist</p>
<p><a href="http://www.rudolfmaduro.com">www.rudolfmaduro.com</a></p>
<p><em>Disclaimer: Test all commands on your sandbox system first. I assume no responsibility if you break your system using this information.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rudolfmaduro.com/2010/05/06/extracting-one-database-from-a-full-mysqldump-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

