<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Drop all tables from a MySQL Database without deletion</title>
	<atom:link href="http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/feed/" rel="self" type="application/rss+xml" />
	<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion</link>
	<description>get all his digital goodness 24/7</description>
	<lastBuildDate>Sat, 04 Feb 2012 17:05:41 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Eddie</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-2980</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Sat, 14 Jan 2012 16:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-2980</guid>
		<description>Made a change to the share tabs, hope the new pop out approach is less intrusive!</description>
		<content:encoded><![CDATA[<p>Made a change to the share tabs, hope the new pop out approach is less intrusive!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: btw</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-2955</link>
		<dc:creator>btw</dc:creator>
		<pubDate>Tue, 08 Nov 2011 14:32:42 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-2955</guid>
		<description>BTW your &#039;share&#039; links on the left cover up the content when the browser is small.  That&#039;s pretty annoying.</description>
		<content:encoded><![CDATA[<p>BTW your &#8216;share&#8217; links on the left cover up the content when the browser is small.  That&#8217;s pretty annoying.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Create a Duplicate Wordpress QA Site</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-1732</link>
		<dc:creator>Create a Duplicate Wordpress QA Site</dc:creator>
		<pubDate>Sat, 04 Dec 2010 06:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-1732</guid>
		<description>[...] This line clears out all the tables in the database. This is handy because in a shared hosting environment you almost certainly won&#8217;t have permission to create and delete entire databases except though the web control panel.  Make sure you type the correct database name as this will make short work of your production database! Thanks to Eddie for this great tip! [...]</description>
		<content:encoded><![CDATA[<p>[...] This line clears out all the tables in the database. This is handy because in a shared hosting environment you almost certainly won&#8217;t have permission to create and delete entire databases except though the web control panel.  Make sure you type the correct database name as this will make short work of your production database! Thanks to Eddie for this great tip! [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pavel</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-1224</link>
		<dc:creator>pavel</dc:creator>
		<pubDate>Mon, 12 Oct 2009 13:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-1224</guid>
		<description>worked like a charm,
elegant solution,
thanks man!</description>
		<content:encoded><![CDATA[<p>worked like a charm,<br />
elegant solution,<br />
thanks man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasinos</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-373</link>
		<dc:creator>Prasinos</dc:creator>
		<pubDate>Sat, 07 Mar 2009 22:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-373</guid>
		<description>Eddie, the &quot;more efficient&quot; bit was tongue-in-cheek :-)
Still, I think that using only mysql is conceptually better: we want the table names so we just execute &quot;show tables&quot;. We don&#039;t need the &quot;create table&quot; statements of mysqldump so why get them and then grep them out?

In any case, the difference is not really important.
I was just toying with mysql/mysqldump to find out more about their potential and your post gave me a nice motivation.</description>
		<content:encoded><![CDATA[<p>Eddie, the &#8220;more efficient&#8221; bit was tongue-in-cheek <img src='http://edwardawebb.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
Still, I think that using only mysql is conceptually better: we want the table names so we just execute &#8220;show tables&#8221;. We don&#8217;t need the &#8220;create table&#8221; statements of mysqldump so why get them and then grep them out?</p>
<p>In any case, the difference is not really important.<br />
I was just toying with mysql/mysqldump to find out more about their potential and your post gave me a nice motivation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddie</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-366</link>
		<dc:creator>Eddie</dc:creator>
		<pubDate>Fri, 06 Mar 2009 22:52:27 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-366</guid>
		<description>@Prasinos
Thanks for the feedback though I&#039;m not sure I understand why you say that is more efficient..

Still one line, and I think that sed would be more resource intensive than grep.
&lt;pre&gt;mysqldump -uuser -ppass --no-data --add-drop-table database &#124; grep ^DROP &#124; mysql  -uuser -ppass database&lt;/pre&gt;
Vs.
&lt;pre&gt;mysql -uuser -ppass -e “show tables” –skip-column-names database &#124; sed -e “s/.*/DROP TABLE IF EXISTS \`&amp;\`;/” &#124; mysql -uuser -ppass database&lt;/pre&gt;
I will leave the choice up to our readers, more options is not a bad thing.</description>
		<content:encoded><![CDATA[<p>@Prasinos<br />
Thanks for the feedback though I&#8217;m not sure I understand why you say that is more efficient..</p>
<p>Still one line, and I think that sed would be more resource intensive than grep.</p>
<pre>mysqldump -uuser -ppass --no-data --add-drop-table database | grep ^DROP | mysql  -uuser -ppass database</pre>
<p>Vs.</p>
<pre>mysql -uuser -ppass -e “show tables” –skip-column-names database | sed -e “s/.*/DROP TABLE IF EXISTS \`&#038;\`;/” | mysql -uuser -ppass database</pre>
<p>I will leave the choice up to our readers, more options is not a bad thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasinos</title>
		<link>http://edwardawebb.com/linux/drop-tables-mysql-database-deletion/comment-page-1/#comment-364</link>
		<dc:creator>Prasinos</dc:creator>
		<pubDate>Fri, 06 Mar 2009 14:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://edwardawebb.com/?p=425#comment-364</guid>
		<description>I think we can be a little more efficient than that. We can just ask mysql to give us the table names and use sed to add the &quot;DROP TABLE IF EXISTS&quot; at the front:

mysql -uuser -ppass -e &quot;show tables&quot; --skip-column-names database &#124; sed -e &quot;s/.*/DROP TABLE IF EXISTS \`&amp;\`;/&quot; &#124; mysql -uuser -ppass database

(all in one line)
We can also use xargs instead of sed.
(You may want to have a look at my &lt;a href=&quot;http://prasinos.eu/articles/drop-all-tables-from-mysql-db&quot; rel=&quot;nofollow&quot;&gt;post&lt;/a&gt; for more info)</description>
		<content:encoded><![CDATA[<p>I think we can be a little more efficient than that. We can just ask mysql to give us the table names and use sed to add the &#8220;DROP TABLE IF EXISTS&#8221; at the front:</p>
<p>mysql -uuser -ppass -e &#8220;show tables&#8221; &#8211;skip-column-names database | sed -e &#8220;s/.*/DROP TABLE IF EXISTS \`&amp;\`;/&#8221; | mysql -uuser -ppass database</p>
<p>(all in one line)<br />
We can also use xargs instead of sed.<br />
(You may want to have a look at my <a href="http://prasinos.eu/articles/drop-all-tables-from-mysql-db" rel="nofollow">post</a> for more info)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

