I want to truncate database tables using command line.
Any directions will be highly appreciated.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Please try with below steps to do easily..
Step1 : to create one file truncate.php in root, create array with all tables, than array load via foreach with
Step2 : run file via command line php -f truncate.php
also try with this below url :
mysql -Nse 'show tables' db_name | while read table; do mysql -e "truncate table $table" db_name;done
// db_name = database name
hope its work for you