<?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>Gary Pendergast &#187; sed</title> <atom:link href="http://pento.net/tag/sed/feed/" rel="self" type="application/rss+xml" /><link>http://pento.net</link> <description>I&#039;m on the Internet</description> <lastBuildDate>Sat, 03 Dec 2011 09:27:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <cloud
domain='pento.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' /> <item><title>Extracting a Database From a mysqldump File</title><link>http://pento.net/2009/04/16/extracting-a-database-from-a-mysqldump-file/</link> <comments>http://pento.net/2009/04/16/extracting-a-database-from-a-mysqldump-file/#comments</comments> <pubDate>Thu, 16 Apr 2009 03:31:55 +0000</pubDate> <dc:creator>Gary</dc:creator> <category><![CDATA[MySQL]]></category> <category><![CDATA[mysqldump]]></category> <category><![CDATA[sed]]></category> <guid
isPermaLink="false">http://pento.net/?p=208</guid> <description><![CDATA[Restoring a single database from a full dump is pretty easy, using the mysql command line client&#8217;s --one-database option: mysql&#62; mysql -u root -p --one-database db_to_restore &#60; fulldump.sql But what if you don&#8217;t want to restore the database, you just want to extract it out of the dump file? Well, that happens to be easy [...]]]></description> <content:encoded><![CDATA[<p>Restoring a single database from a full dump is pretty easy, using the <kbd>mysql</kbd> command line client&#8217;s <kbd>--one-database</kbd> option:</p><pre>mysql&gt; mysql -u root -p --one-database db_to_restore &lt; fulldump.sql</pre><p>But what if you don&#8217;t want to restore the database, you just want to extract it out of the dump file? Well, that happens to be easy as well, thanks to the magic of <kbd>sed</kbd>:</p><pre>shell&gt; sed -n '/^-- Current Database: `test`/,/^-- Current Database: `/p' fulldump.sql &gt; test.sql</pre><p>You just need to change &#8220;test&#8221; to be the name of the database you want extracted.</p> ]]></content:encoded> <wfw:commentRss>http://pento.net/2009/04/16/extracting-a-database-from-a-mysqldump-file/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> </channel> </rss>
