mysqldump -p dbname > filename
mysqladmin -p drop dbname
mysqladmin -p create dbname
mysql -p < filename
use dbname;