Jun 20, 2011

MySQL

# dump
mysqldump db_name -uroot -p > ffff.sql
mysql db_name -uroot -p < ffff.sql 

# drop all tables
mysql -BNe "show tables" db_name | awk '{print "drop table " $1 ";"}' | mysql db_name

No comments: