[英]MySQL-DB Connection with MAC!
When i try to connect to my MYSQL-DB from a Windows-PC everything works, but when i try it from a Mac (I tried it with 2 macs) i get the errormessage "Can't get hostname". 当我尝试从Windows-PC连接到我的MYSQL-DB时,一切正常,但是当我从Mac上尝试它时(我尝试使用2个mac)我得到错误消息“无法获取主机名”。 I'm using MySQL-Workbench 5.2.31.
我正在使用MySQL-Workbench 5.2.31。 The DB is running on Windows Server 2008 R2.
数据库正在Windows Server 2008 R2上运行。
EDIT: More Info: 编辑:更多信息:
Thanks in advance! 提前致谢!
You need to add the ip-adress and a hostname in the hosts-file of the server. 您需要在服务器的hosts文件中添加ip-adress和主机名。 The server tries to get a hostname for the ip of the mac, but can't find any.
服务器尝试获取mac的ip的主机名,但找不到任何。 You may turn off this check in the config of your mySQL Server.
您可以在mySQL Server的配置中关闭此检查。
Check your dns settings. 检查你的DNS设置。 On mac, open a terminal check if nslookup win2008_dns_address resolves to your ip address.
在Mac上,打开终端检查nslookup win2008_dns_address是否解析为您的IP地址。 If not, fix your dns settings.
如果没有,请修复您的DNS设置。 Otherwise, again on mac, sudo vi /etc/hosts and append your Win2008 server ip and win2008 hostname there.
否则,再次在mac,sudo vi / etc / hosts上添加你的Win2008服务器ip和win2008主机名。 Correct format would be
格式正确
IP_ADDRESS HOSTNAME
save and try. 保存并尝试。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.