Bug #111130 Root user could not acquire management access for administration.
Submitted: 24 May 2023 7:25 Modified: 1 Jun 2023 19:21
Reporter: Miklós Csuvár Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:8.0.33 OS:Windows
Assigned to: MySQL Verification Team CPU Architecture:x86 (AMD Ryzen 7 5700G with Radeon Graphics 3.80 GHz)

[24 May 2023 7:25] Miklós Csuvár
Description:
After starting MySQL Workbench 8.0 CE and entering Local (127.0.0.1) connection, I wanted to check server settings.
The error messages are always the same:
Error 1:
"Could not acquire management access for administation
RuntimeError: Unable to execute command chcp.
Please make sure that the C:\Windows\System32 directory is in your PATH environment variable."

Error 2:
"Error during ""
error calling Python module function WbAdmin.openAdminSection"

Details:
PATH
"C:\Windows\System32" is in the System environment variables and in PATH of User1 (administrator) as well.
Codepage
chcp result in "Active code page: 65001", but it can be made to run only from
C:\Windows\System32, not from C:\.

After these were set, the PC was restarted.

The system
Edition	Windows 10 Home
Version	22H2
Installed on	‎2022. ‎05. ‎30.
OS build	19045.2965
Experience	Windows Feature Experience Pack 1000.19041.1000.0

How to repeat:
Starting MySQL Workbench 8.0 CE.
[24 May 2023 11:04] MySQL Verification Team
Hello Miklós Csuvár,

Thank you for the bug report.
Does this issue occurs on non-English windows installs?

Regards,
Ashwini Patil
[31 May 2023 8:56] Miklós Csuvár
Hello Ashwini Patil,

The Windows 10 is English install, the system language is English. The Office is Hungarian, if it matters.

Miklós Csuvár
[31 May 2023 10:59] MySQL Verification Team
Duplicate of https://bugs.mysql.com/bug.php?id=103339. Thanks.
[1 Jun 2023 4:09] Miklós Csuvár
Hello,

Bug #103339 referred to #102300.

Bug #103339
https://bugs.mysql.com/bug.php?id=103339. It was solved with changing the system locale to English. Bug #111130 has not been solved this way.
Though bug #111130 occured first with setting Hungarian, I tested it, before reporting #111130, with locale English-US (beta: UTF-8).
Today I tested it with locale English-US setting (without any beta) plus restart.
Bug #111130 persist.

Bug #102300
It suggested a patch to c:\Program Files\MySQL\MySQL Workbench 8.0\workbench\os_utils.py
In the file above, I replaced
line "process = subprocess.Popen(command, stdin = subprocess.PIPE, encoding="utf-8", stdout = subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)" with
line "process = subprocess.Popen(command, stdin = subprocess.PIPE, text=True, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)
".
I restarted my PC.
Bug #111130 persist.

Best wishes,
Miklós Csuvár
[1 Jun 2023 19:21] Miklós Csuvár
Hello,

At Bug #102300 there was a second fix. I followed the instruction.
I replaced line "f = open(path, 'r')" with line "f = open(path, 'r', encoding='utf-8')" in "c:\Program Files\MySQL\MySQL Workbench 8.0\workbench\os_utils.py".
Concurrently I set back the former patch to "process = subprocess.Popen(command, stdin = subprocess.PIPE, encoding="utf-8", stdout = subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)".
The bug persist.

I set back the Regional settings to English-US (Beta: UTF-8).
The bug persist.