Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
yep, nothing happened after the upgrade. though it's still weird that mysql asks for a new password – alvas Sep 5 '12 at 12:36

Your Answer


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.