HOEKSTRA.CO.UK

... without destroying the database. 

You can do it all in the shell:

  • Create a SQL script from the database to drop all the tables
  • Execute the SQL script against the database

mysql -u[pwd] -p[user] [dbname] -s -e 'show tables' | sed -e 's/^/drop table /' -e 's/$/;/' > dropalltables.sql
mysql -u[pwd] -p[user] [dbname] < dropalltables.sql