Bug #61093 After upgrade, users and privileges wiped
Submitted: 8 May 2011 16:41 Modified: 17 Sep 2011 11:41
Reporter: Fernando Vinan-Cano Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.5.x OS:Windows (Server 2008 R2)
Assigned to: CPU Architecture:Any

[8 May 2011 16:41] Fernando Vinan-Cano
Description:
For every GA release of 5.5.x (64bit) I have used to upgrade my MySQL installation, the users/privileges data have been completely wiped. The root password gets reset to blank and all my users have vanished. My other data is always fine.

I only have a few databases and users, so can easily recreate them, but it's getting tiresome now. I'm wondering if it's related to the fact that my install is on D:\MySQL and not the default location for a clean install.

Also I noticed that the installer showed on a window "Click Upgrade to upgrade your installation from version  to version 5.5.12. Click Cancel to exit the upgrade". Notice that it doesn't display a version number for "from"!

How to repeat:
Upgrade my installation
[9 May 2011 10:59] MySQL Verification Team
Thank you for the bug report. I assume you tried to upgrade from 5.5.11 to 5.5.12 right?. Both installation have the same non default location?. If yes could you please describe step by step the upgrade process. Thanks in advance.
[9 May 2011 12:14] Fernando Vinan-Cano
Yes, .11 to .12, but it was the same for .9 to .10, .10 to .11 and any before that. The location of MySQL on my server hasn't changed in over 5 years, always D:\MySQL for all parts including binaries and libs.

There are no real steps except that I accept and hit next - the installer recognises I want to do an upgrade, hence the message I mentioned before, and just gets on with it. The only thing I do is make sure the MySQL service is stopped and that I make an archive of the D:\MySQL folder to make sure I have a backup.
[10 May 2011 23:22] MySQL Verification Team
Thank you for the feedback. What is the path of the datadir?. Thanks in advance.
[11 May 2011 7:28] Fernando Vinan-Cano
D:\MySQL\data
[15 May 2011 21:49] MySQL Verification Team
http://bugs.mysql.com/bug.php?id=61177 marked as duplicate of this.
[4 Jun 2011 7:53] Fernando Vinan-Cano
I have noticed that 5.5.13 is now out - is this bug fixed yet or even being looked at?

I'd like to know before trying it so I can schedule enough time for the extra work needed to fix my installation after it gets wrecked
[11 Jul 2011 19:56] Fernando Vinan-Cano
Still present with 5.5.14

Please fix this as I'm really getting fed up with losing my accounts and root password each and every time I upgrade!
[11 Jul 2011 20:19] Peter Laursen
see this: http://bugs.mysql.com/bug.php?id=61826
[11 Jul 2011 20:21] Peter Laursen
and http://bugs.mysql.com/bug.php?id=61814
[15 Jul 2011 8:14] Valeriy Kravchuk
Let's say this is a duplicate of Bug #61826. As a temporary workaround, put your datadir elsewhere, not in data subdirectory of installation directory.
[28 Jul 2011 13:17] Fernando Vinan-Cano
"As a temporary workaround, put your datadir
elsewhere, not in data subdirectory of installation directory."

How about you actually fix the bug you have introduced instead of making me do extra work? I have scripts and other systems that look for files in that directory and I'm not about to put changes there.

Just tried 5.5.15 and the same, although I restored the data\mysql folder back from my backup, which I do before any upgrade, and nothing was lost.

This is a simple problem so why is it taking so long to fix?
[17 Sep 2011 11:41] Fernando Vinan-Cano
Please fix this, yet another release, 5.5.16, that wipes the previous database files in "\mysql\data\mysql"

Each time I have to manually restore them from my backup and then run the mysql_upgrade.exe

Why is the installer still doing this?