gpt4 book ai didi

mysql - 无法连接到 targat 机器

转载 作者:行者123 更新时间:2023-11-29 04:38:19 27 4
gpt4 key购买 nike

问题描述:

我要将MySQL server 5.7.11 (win32) 安装到Windows server 2012 中。服务器中安装了多个网络接口(interface)卡,我将安装多个绑定(bind)到特定IP 地址的MySQL 实例。简而言之,我将在同一台机器上安装绑定(bind)到不同 IP 地址的多个 MySQL 实例。

我设法安装了第一个 MySQL 实例并能够成功启动服务。但是当使用 MySQL Workbench 6.3.6 CE (win32) 连接到实例时,我收到以下错误消息。

RuntimeError: Could not initialize WMI interface: Workbench.wmiOpenSession(): Could not connect to target machine.

安装程序:

  • mysql-5.7.11-win32.zip(无需安装)
  • mysql-workbench-community-6.3.6-win32-noinstall.zip

my.ini配置:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir=D:/apps/mysql-5.7.11
datadir=D:/apps/nrcc/data
port=3306
bind-address=10.82.95.2


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

MySQL 工作台配置:

请参阅下图了解配置。打开 Workbench 并单击“服务器状态”或“选项文件”时,它会提示输入用户名和密码。但随后是错误消息。

Workbench configurations and error messages

我以为是因为我的用户没有 WMI 权限,所以我点击了这个链接 Creating a user with Windows Management Instrumentation (WMI) permissions配置用户,但它仍然无法正常工作。请注意,该用户在本地管理员组中。

非常感谢任何帮助,谢谢!

最佳答案

我设法从另一台服务器(我的应用程序服务器)上运行的 MySQL Workbench 远程连接到我的 MySQL 服务器,但如果我在同一台服务器上执行此操作,问题仍然存在。

我已经测试过,通过向 MySQL 服务器中的用户授予 WMI 权限,连接可以正常工作。下面的列表显示了我所做的:

  1. 在MySQL服务器中,为用户添加以下组。

    • 分布式 COM 用户
    • 性能日志用户
    • 远程桌面用户
  2. 配置 WMI 命名空间安全分配

    a. Go to Windows Start > Run....
    b. Enter wmimgmt.msc and click OK.
    c. Right-click WMI Control (Local) and select Properties.
    d. Click the Security tab.
    e. Click Security.
    f. Click Add.
    g. Click Advanced.
    h. Click Find Now.
    i. Select the new user account, and click OK until you return to the Security for Root window.
    j. Click Advanced and select the newly added user account.
    k. Click Edit.
    l. From the Apply to: menu selection, select This namespace and subnamespaces.
    m. In Execute Methods, verify that Enable Account, Remote Enable, and Read Security are selected.
    n. Click OK until you return to the wmimgmt window.
    o. Select File > Exit to exit the wmimgmt window.

关于mysql - 无法连接到 targat 机器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35887695/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com