Clean all Mysql Data

/etc/init.d/mysql stop
/etc/init.d/mysql start
mysql -uroot
mysql -uroot   -e “show databases” | grep -v Database | grep -v mysql| grep -v information_schema| grep -v test | grep -v OLD |gawk ‘{print “drop database ” $1 “;select sleep(0.1);”}’ | mysql -uroot
/etc/init.d/mysql stop
rm ibdata1
rm ib_logfile*
rm -rf mysql



Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.