我正在尝试从windows服务器访问linux机器上的MySQL。我已经创建了一个用户foo@10.%,并注释掉了my.cnf中的绑定地址行,但我仍然无法连接。
我有一个运行MySQL的Ubuntu13.10Linux64位机器。它位于包含Windows域的网络上。linux机器没有加入域,但它在网络上。换句话说,它正在从域控制器获取其IP地址,并将其用于DNS。所以这很好。
在linux机器上,我可以通过IP地址ping到域中的Windows服务器。但是,这些windows服务器无法ping通linux机器。我怀疑我需要更改linux机器上的网络、防火墙或端口设置,但我不确定需要查看哪里。任何帮助都将不胜感激。
发布于 2014-04-01 23:29:35
禁用你的linux机器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的端口-因为禁用将打开所有端口!在这里要小心!
对此进行初始测试,如果连接正常,则在文件墙上应用端口规则
发布于 2014-04-03 00:33:01
Linux box是一个运行在VirtualBox下的虚拟机,网络类型为NAT。在VirtualBox中将来宾网络从NAT更改为桥接适配器。已解决此问题的。我为我忽略了这一点而感到羞愧。
https://stackoverflow.com/questions/22790194
复制相似问题