Purging a database by command line

Table of Contents

  1. Purging a database

You can use the mage-dbpurge utility to completely empty a MySQL database. This is useful clear out and existing Magento installation if you intend to restore a backup.

It will read your MySQL details from your Magento ./app/etc/local.xml file automatically

cd /domains/example.com/http
wget sys.sonassi.com/mage-dbpurge.sh

! This utility will erase the whole database contents, make sure you backup first

Purging a database

cd /domains/example.com/http
bash mage-dbpurge.sh

Read more about the tool on https://www.sonassi.com