Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

http://stuffthatspins.com/2011/01/08/ubuntu-10-x-completely-remove-and-clean-mysql-installation/ shows how to reinstall everything.

I want to do something like this without reinstalling data.

Obviously I can't execute this: delete preferences(the next find command will delete everything):

rm -rf /etc/mysql

find all files with “mysql” on / and delete them:

find / -iname ‘mysql*’ -exec rm -rf {} \;

Then I run

sudo aptitude purge mysql-server
sudo aptitude install mysql-server

But then I run into problem because I can't access some mysql-bin.0000x is not writeable or something.

If I keep mysql-bin.index empty or deleted it I got complaint that files are empty or inaccessible. I think the issue is that mysql doesn't have permission to access those file. However, I can't give them permission because the installation is supposedly automatic.

So what should I do?

This is for amazon-ec2

share|improve this question
    
when you say I cant set the permissions, you used sudo chmod 777FILE-NAME ? btw 777 is kinda a security risk: tinyurl.com/cv6psay –  Dr_Bunsen Aug 7 '12 at 9:17
    
Hnmmm... I'll try that. –  Jim Thio Aug 8 '12 at 15:18

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.