【问题标题】:Unable to access resources on linux in windows domainwindows域无法访问linux资源
【发布时间】:2014-04-01 15:25:19
【问题描述】:

我正在尝试从 Windows 服务器访问 linux 机器上的 MySQL。我创建了一个用户 foo@10.% 并在 my.cnf 中注释掉了 bind-address 行,但我仍然无法连接。

我有一个运行 MySQL 的 Ubuntu 13.10 Linux 64 位机器。它位于具有 Windows 域的网络上。 linux盒子没有加入域,但它在网络上。换句话说,它从域控制器获取其 IP 地址并将其用于 DNS。所以这很好。

在 linux 机器上,我可以通过 IP 地址 ping 域上的 Windows 服务器。但是,那些 windows 服务器无法 ping linux 机器。我怀疑我需要更改 linux 机器上的网络或防火墙或端口设置,但我不确定我需要查看哪里。任何帮助将不胜感激。

【问题讨论】:

  • 您必须打开端口 3306...可能是防火墙问题??

标签: mysql linux windows networking


【解决方案1】:

禁用你的 linux box sealinux

root@XXXXX /]# vim /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

改变你的文件看起来像这样! 我只想为 mysql 打开一个 3306 的端口 - 因为禁用将打开所有端口!这里要小心!
初步测试一下,如果你能连接到工作,然后在我们的文件墙上应用端口规则

【讨论】:

    【解决方案2】:

    Linux 机器是在 VirtualBox 下运行的虚拟机,网络类型为 NAT。 在 VirtualBox 中将访客网络从 NAT 更改为桥接适配器。 这解决了这个问题。我很惭愧我忽略了这一点。

    【讨论】:

      猜你喜欢
      • 2012-12-20
      • 1970-01-01
      • 1970-01-01
      • 2012-11-05
      • 2015-07-17
      • 2019-01-02
      • 1970-01-01
      • 1970-01-01
      • 2021-04-30
      相关资源
      最近更新 更多