DHCP服务器问题中的Mysql数据库 [英] Mysql database in DHCP sever issues

查看:245
本文介绍了DHCP服务器问题中的Mysql数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在本地网络应用程序中使用MySQL作为我的应用程序数据库。在连接字符串中,我使用IP地址而不是计算机名。在过去三年中,一切都运行良好,没有任何错误,但最近我们将服务器更改为DHCP服务器。从那时起,我收到许多连接错误,因为MySQL主机没有响应,连接失败等等。我只想知道如果我在应用程序连接字符串而不是IP地址中使用计算机名称/服务器名称,我可以获得任何好处吗?由于我是新手,请帮助我区分在连接字符串中使用IP地址和计算机名称。



我尝试过:



我试过调试连接错误。并且似乎有两个计算机使用相同的IP地址导致问题。除非我有专家建议,否则我无法对申请进行任何更改。

-Thanks提前

Hi all,
I am using MySQL as my application database in a local network applications. And in connection string I used IP address instead of computer-name. And the last three years everything worked very well without any errors but recently we changed our sever as a DHCP sever. From that point I am getting many connection errors as MySQL host not responding, connection failed etc. I just want to know can I have any benefits if I use computer name/server name in application connections string instead of IP Address?. As I am a newbie please help me to distinguish between using IP address and computer name in connection strings.

What I have tried:

I tried debugging the connection errors. And it seems that same IP address is sometimes used by two computers causing the issues. I am not able to make any change in applications unless until i have an expert advice regarding.
-Thanks in advance

推荐答案

Quote:

两台计算机有时会使用相同的IP地址

same IP address is sometimes used by two computers

这意味着您没有正确设置网络。可能还有一些计算机仍在使用固定IP地址而不是DHCP服务器的IP地址。所以你的问题不是MySQL问题,而是网络配置问题。

通常情况下,DHCP服务器可以被告知它可以自动分配哪些地址,以及保留哪些地址。通过网络中的所有计算机和其他设备(例如打印机)查看,确保它们从DHCP服务器获取其地址,或者它们的固定IP地址属于保留范围(并且是唯一的)。

That means that you did not set up your network properly. Likely, there are still some computers still using fixed IP addresses instead of IP addresses from the DHCP server. So your problems are not a MySQL problem but a network configuration problem.
Normally a DHCP server can be told which addresses it can assign automatically, and which addresses are reserved. Look thru all computers and other devices (e.g. printers) in your network, make sure they get their addresses from the DHCP server, or their fixed IP address falls into the reserved range (and is unique).


这篇关于DHCP服务器问题中的Mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆