Hi couldn't understand why apt-get would always give the following error when trying to downgrade mysql on ubuntu:
After deleting that directory, I ran the following command, and had mysql setup and ready to go:
Unpacking mysql-server-5.0 (from .../mysql-server-5.0_5.0.51a-3ubuntu5.4_amd64.deb) ...Finally figured it out. For downgrading, you must delete /var/lib/mysql directory.
Aborting downgrade from (at least) 5.1 to 5.0.
dpkg: error processing /var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5.4_amd64.deb (--unpack):
subprocess pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/mysql-server-5.0_5.0.51a-3ubuntu5.4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
After deleting that directory, I ran the following command, and had mysql setup and ready to go:
sudo apt-get -f install
thanks a lot!!!
ReplyDeletei couldn't downgrade from mysql 5.1 to 5.0 , and i've search in a lot of forums and i didn't found anything usefull.
The answer is delete de directory as you said.
mbarria
You're very welcome Marcelo - glad this was of help :-)
ReplyDeleteThank you, helped me as well - couldn't find this answer on the first 15 sites I looked :)
ReplyDeleteWell, just don't ask where your databases went and why to hell.
ReplyDeleteI found it simpler to (re)move debian-5.1.flag and mysql_upgrade_info from that directory.
Of course that flags aren't for nothing, so be warned that your mileage may vary.
Thanks a lot!!! You are a life saver...
ReplyDeleteYou're welcome Gustavo. I'm glad this was of help!
ReplyDeleteThanks alot, though you DO NOT need to delete the whole directory, it is sufficient to remove the flag file located inside the directory, at least for me that worked.
ReplyDeletecheers :)
ReplyDeleteI love you! You're my hero!
ReplyDeleteLol - you're very welcome, Sebastian. I'm glad this was of help!
ReplyDelete@Dźwiedziu
ReplyDeleteThank goodness I saw your post I almost killed all my data... Your suggestion worked perfectly!!!
Just delete those 2 files
Thank you very much for this, even a year later..I fubar'd my Nagios install, at least some dependency on apache2....im stupid but you saved me! Thanks again.
ReplyDeletevery very very much thanks!!! i have sex with this error 2 hour >:-(
ReplyDeleterm /var/lib/debian-5.1.flag
ReplyDelete