Bug #109636 MySQL Installer seeks and is denied access to D:\System Volume Information
Submitted: 15 Jan 2023 12:28 Modified: 22 Jan 2023 2:43
Reporter: David Webb Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server: Windows Severity:S1 (Critical)
Version: OS:Windows (10)
Assigned to: CPU Architecture:Any

[15 Jan 2023 12:28] David Webb
I have been using Windows MySQL Server 8.0.20 and decided it was time to upgrade. The installer fails with the error:

Unhandled exception has occured in your application...
Access to the path 'D:\System Volume Information' is denied.

That folder is a hidden system folder on each Windows volume. The installer shouldn't be fiddling with it or need access. It never did with previous upgrades.

I also tried the smallest increment to 8.0.21 rather than 8.0.31 but with the same problem. The "Details" box is as follows:

System.UnauthorizedAccessException: Access to the path 'D:\System Volume Information' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.AddSearchableDirsToStack(SearchData localSearchData)
   at System.IO.FileSystemEnumerableIterator`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
   at MySql.Installer.Core.Classes.Utilities.GetServerInstanceProcessId(String dataDirectory)
   at MySql.Installer.Plugins.Server.LocalServerInstance.get_RunningProcess()
   at MySql.Installer.Plugins.Server.LocalServerInstance.StopInstance()
   at MySql.Installer.Plugins.Server.LocalServerInstance.ShutdownInstance(Boolean useOldSettings)
   at MySql.Installer.Plugins.Server.ServerConfigurationController.StopServerSafe(Boolean useOldSettings)
   at MySql.Installer.Plugins.Server.ServerConfigurationController.PreUpgrade()
   at MySql.Installer.Core.Package.PackageManager.NotifyPackageStarted(IPackage package, PackageAction action)
   at MySql.Installer.Core.Package.PackageManager.Execute()
   at MySql.Installer.Wizards.Common.InstallProgressPage.Execute()
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How to repeat:
Try an upgrade on Windows from 8.0.20.
[16 Jan 2023 12:17] MySQL Verification Team
Hello David,

Thank you for the bug report.
I tried to reproduce your issue on windows 10 and upgraded workbench from 8.0.20 to 8.0.31 but I am not seeing any issues at my end.

Ashwini Patil
[16 Jan 2023 13:43] David Webb
Thanks for your reply. If it makes a difference:
My C-drive holds the installation and my D-drive (which is a RAID pair) holds the data. So:
C:\Program Files\MySQL\MySQL Server 8.0
Can you try that setup and see if it invokes the problem?
[22 Jan 2023 2:34] David Webb
Hello Ashwani. Did you try again with the drives and directories I posted above?
[22 Jan 2023 2:43] David Webb
OK so on a hunch, I thought: "what if the installer is trying to access the parent directory of my data folder, and there isn't one because the data folder is at the top of the D-drive?"
So I shut down MySQL, then I moved the data folder one layer down from:
Then I edited my.ini to tell it where the data folder is now. Then I restarted MySQL.
Next, I ran MySQL installer, and this time, the upgrade worked!
So, what I have discovered is a bug in which, for some reason, the installer fails if the data folder is in the top level of a drive. Please fix that!
David Webb
[12 Mar 15:26] Tilman Brock-Hesse
The fix from David Webb also worked for us. We had a similar structure, mysql data folder at d:\mysql-data. When we moved that to d:\mysql-data\data everything worked.