What happens to existing MySQL databases when I upgrade my Ubuntu distro?
Your databases will remain untouched (though of course I can't be liable :) ).

The reason are are being asked for a password could be:


Your new Ubuntu version uses a newer version of MySQL (it does). It needs root password so as to run the mysql_upgrade utility, which upgrades internal mysql schema to fit new version
You new installation includes new packages/dependencies, for which a new schema should be created. Such packages could be phpmyadmin, cacti, bugzilla, wordpress or any others which may require use of a database schema.


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.