zl程序教程

您现在的位置是:首页 >  其他

当前栏目

# 安装MySQL8.0.25后,出现“Exception: Current profile has no WMI enabled”错误解决方案

错误安装解决方案 出现 25 No has enabled
2023-06-13 09:11:52 时间

大家好,又见面了,我是你们的朋友全栈君。

安装MySQL8.0.25后,出现“Exception: Current profile has no WMI enabled”错误解决方案

问题描述


最近更新MySQL到8.0.25版本后,查看ServerStatus,出现“Exception: Current profile has no WMI enabled”错误,出于人的惰性,直接baidu->google->stackoverflow->oracle…然而找到的办法大多是提示:

  • Open MySQL Workbench
  • click on “Manage Server Instances” under “Server Administration” column
  • close the screen again.
  • Now click on the instance again, the issue should be fixed. 或者
  • Open MySQL Workbench
  • Click Manage Server Instances
  • Select System Profile tab
  • Check box(es) to acquire Admin privileges 然而问题仍然没有解决。

解决方案


经过阅读log中给出的出错提示:

20:18:21 [ERR][wb_server_management.py:local_run_cmd_windows:407]: Exception executing local command: chcp.com: 'utf-8' codec can't decode byte 0xbb in position 0: invalid start byte Traceback (most recent call last): File "C:\Program Files\MySQL\MySQL Workbench 8.0\modules\wb_server_management.py", line 404, in local_run_cmd_windows retcode = OSUtils.exec_command(command, output_handler) File "C:\Program Files\MySQL\MySQL Workbench 8.0\workbench\os_utils.py", line 360, in exec_command for line in iter(process.stdout.readline, ""): File "C:\Program Files\MySQL\MySQL Workbench 8.0\Python\Lib\codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbb in position 0: invalid start byte

分别打开这三个出错源代码文件,然后根据最后的一句提示,终于发现了出错源头,在os_utils.py源文件中

process = subprocess.Popen(command, stdin = subprocess.PIPE, encoding="utf-8", stdout = subprocess.PIPE, stderr = subprocess.STDOUT, shell=True)

            # Sends all the command output to the listener
            if output_handler:
                for line in iter(process.stdout.readline, ""):

encoding参数是“utf-8”,这就是罪魁祸首。。。。。


解决方案一

直接切换操作系统的语言为英文,重启电脑后,经过验证完美解决

解决方案二

修改上面提到的os_utils.py的源代码,将utf-8改成gbk,然后重启MySQL workbench,经验证也完美解决

解决方案三

回退版本(评论区老哥提出),经过我询问他人确实能解决该问题


注意事项

  1. 你需要查看你的服务中本地MySQLxxx,你自己安装时候命名的服务有无开启
  2. 保证前面的安装配置没瞎设置

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/138606.html原文链接:https://javaforall.cn