I am in the midst of upgrading my Ubuntu distro from 10.4 to 12.4. Fearfully, it asked me for root password on MySQL when I was upgrading the distro.
I used to have databases on that server, would they be erased? If so, how could I get them back?
Your databases will remain untouched (though of course I can't be liable :) ).
The reason are are being asked for a password could be:
You should be in particular comfortable with this upgrade since this is from one LTS (Long Term Support) version to another. Not that I would expect database problems with other upgrades, but still, LTS versions are expected to be more "trusted".
Just to conclude, I am using Ubuntu. Usually installing MySQL from external binaries, but sometimes from package. I've never heard of a "data gone lost" problem due to an upgrade.