MySQL Forums
Forum List  »  Newbie

Re: drop all tables in a a database
Posted by: Russell Dyer
Date: June 25, 2005 11:13AM

Maybe you're using an older version of MySQL than I am. However, DROP DATABASE db1; is replicated from my master to my slave server. Check your error log to see what happens when you try to drop a database. As for a method of dropping all tables in a database, I can't think of a way to do that within MySQL. However, you could write a Perl script or some other kind of script to retrieve a list of table names and then loop through the list deleting each table.

Russell Dyer

Author of "MySQL in a Nutshell" (O'Reilly 2005).

Options: ReplyQuote


Subject
Written By
Posted
Re: drop all tables in a a database
June 25, 2005 11:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.