Truncate MySQL

(This is a legacy post from the old website.)

Blows out schema but leaves db with permissions etc. intact.

mysqldump -u<USER> -p<PASS> --add-drop-table --no-data <DATABASE> | grep ^DROP | mysql -u<USER> -p<PASS> <DATABASE>

Leave a Reply

Your email address will not be published. Required fields are marked *