<?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/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: MySQL Empty Database / Delete or Drop All Tables</title>
	<atom:link href="http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/</link>
	<description>Every answer asks a more beautiful question.</description>
	<lastBuildDate>Thu, 18 Mar 2010 07:00:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Harshit</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-45186</link>
		<dc:creator>Harshit</dc:creator>
		<pubDate>Tue, 15 Dec 2009 15:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-45186</guid>
		<description>I agree with Romina

I followed it and ended with completely deleting the database and not just the tables!! Your post title is absolutely incorrect. Please change it..

EVERYONE BE CAREFUL WHILE DOING THIS</description>
		<content:encoded><![CDATA[<p>I agree with Romina</p>
<p>I followed it and ended with completely deleting the database and not just the tables!! Your post title is absolutely incorrect. Please change it..</p>
<p>EVERYONE BE CAREFUL WHILE DOING THIS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lon F. Binder</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-43783</link>
		<dc:creator>Lon F. Binder</dc:creator>
		<pubDate>Tue, 22 Sep 2009 20:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-43783</guid>
		<description>A little longer, but also a little more efficient because it does the drop (of all tables) in one shot:

&lt;code&gt;
mysql --user=YOUR_USERNAME --password=YOUR_PASSWORD -BNe &quot;show tables&quot; YOUR_DBSCHEMA_NAME &#124; tr &#039;\n&#039; &#039;,&#039; &#124; sed -e &#039;s/,$//&#039; &#124; awk &#039;{print &quot;SET FOREIGN_KEY_CHECKS = 0;DROP TABLE IF EXISTS &quot; $1 &quot;;SET FOREIGN_KEY_CHECKS = 1;&quot;}&#039; &#124; mysql --user=YOUR_USERNAME --password=YOUR_PASSWORD  YOUR_DBSCHEMA_NAME
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>A little longer, but also a little more efficient because it does the drop (of all tables) in one shot:</p>
<p><code><br />
mysql --user=YOUR_USERNAME --password=YOUR_PASSWORD -BNe "show tables" YOUR_DBSCHEMA_NAME | tr '\n' ',' | sed -e 's/,$//' | awk '{print "SET FOREIGN_KEY_CHECKS = 0;DROP TABLE IF EXISTS " $1 ";SET FOREIGN_KEY_CHECKS = 1;"}' | mysql --user=YOUR_USERNAME --password=YOUR_PASSWORD  YOUR_DBSCHEMA_NAME<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ddb</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-41602</link>
		<dc:creator>ddb</dc:creator>
		<pubDate>Thu, 14 May 2009 05:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-41602</guid>
		<description>You can use also:
mysql&gt; use database;
mysql&gt; truncate tablename;
 to empty a table!</description>
		<content:encoded><![CDATA[<p>You can use also:<br />
mysql&gt; use database;<br />
mysql&gt; truncate tablename;<br />
 to empty a table!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: OnkelBeh</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-40694</link>
		<dc:creator>OnkelBeh</dc:creator>
		<pubDate>Wed, 11 Mar 2009 12:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-40694</guid>
		<description>What about :
&lt;code&gt;mysqldump -u[user] -p[ssht...] --add-drop-table --no-data [DATABASE] &#124; grep ^DROP &#124; mysql -u[user] -p[sshht...] [DATABASE]&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>What about :<br />
<code>mysqldump -u[user] -p[ssht...] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[user] -p[sshht...] [DATABASE]</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mas</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-40082</link>
		<dc:creator>Mas</dc:creator>
		<pubDate>Mon, 02 Feb 2009 00:14:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-40082</guid>
		<description>Great post and you do not need create database privileges for this. The method is only dropping the tables and not the database.  The user should have create tables under the database.. 

Thanks</description>
		<content:encoded><![CDATA[<p>Great post and you do not need create database privileges for this. The method is only dropping the tables and not the database.  The user should have create tables under the database.. </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: google pagerank</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-38678</link>
		<dc:creator>google pagerank</dc:creator>
		<pubDate>Fri, 29 Aug 2008 06:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-38678</guid>
		<description>Really informative post..thanks..:)</description>
		<content:encoded><![CDATA[<p>Really informative post..thanks..:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-38207</link>
		<dc:creator>Colin</dc:creator>
		<pubDate>Tue, 01 Jul 2008 15:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-38207</guid>
		<description>Unfortunately this is no use if you don&#039;t have permissions for create database (like the situation i am currently in).</description>
		<content:encoded><![CDATA[<p>Unfortunately this is no use if you don&#8217;t have permissions for create database (like the situation i am currently in).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: romina</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-37939</link>
		<dc:creator>romina</dc:creator>
		<pubDate>Fri, 16 May 2008 20:41:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-37939</guid>
		<description>You can have the drop privilege, but not the create database one!!

BE CAREFUL WHEN DOING THIS! You might end up with no DB at all.

Please don&#039;t suggest this kind of procedures without explaining the whole nine yards.</description>
		<content:encoded><![CDATA[<p>You can have the drop privilege, but not the create database one!!</p>
<p>BE CAREFUL WHEN DOING THIS! You might end up with no DB at all.</p>
<p>Please don&#8217;t suggest this kind of procedures without explaining the whole nine yards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/comment-page-1/#comment-37605</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Tue, 11 Mar 2008 10:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.cyberciti.biz/faq/how-do-i-empty-mysql-database/#comment-37605</guid>
		<description>Alternative methods:

In PHPMyAdmin, you can check all tables and then choose with selected: drop.

If you are doing it with scripting, You can use SHOW TABLES to list the tables, and use this to generate a query DROP TABLE [tablename],[tablename]...</description>
		<content:encoded><![CDATA[<p>Alternative methods:</p>
<p>In PHPMyAdmin, you can check all tables and then choose with selected: drop.</p>
<p>If you are doing it with scripting, You can use SHOW TABLES to list the tables, and use this to generate a query DROP TABLE [tablename],[tablename]&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.096 seconds -->
<!-- Cached page served by WP-Cache -->
