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

# 安装MySQL8.0.25后,出现“Exception: Current profile has no WMI enabled”错误解决方案问题描述最近更新MySQL到8.0.25版本后,查看ServerStatus,出现“Exception:CurrentprofilehasnoWMIenabled”错误,出于人的惰性,直接baidu->google->stackoverflow->oracle…然而找到的办法大多是提示:OpenMySQLWorkbenchclickon“ManageServerInstances”under“ServerAdministration”column

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

安装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.net/138606.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号