Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to completely remove MySQL all databases and installation and reinstall, because root is broken. I followed this instructions:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

But when I install again with

sudo apt-get install mysql-server

old databases, old users table with broken users etc. are here, so no completely uninstall/repair

I'm stuck, help please, thank you very much!

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Add

rm -rf /var/lib/mysql
rm -rf /etc/mysql*

before the install to delete everything, but be careful you can have third parties schemas there like phpmyadmin,... So consider deleting one by one subfolder.

Maybe there is an elegant way of doing this, like mysql_secure_installation

share|improve this answer
    
thank you, yes few miutes ago solved wit whis commands: rm -rf /var/lib/mysql and rm -rf /etc/mysql* –  Desttro Jul 8 '13 at 8:00
    
excelent! :D :P –  mirkobrankovic Jul 8 '13 at 8:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.